Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


c program to check whether all the directories in the path
exists has read and write permission



c program to check whether all the directories in the path exists has read and write permission..

Answer / rakesh

#!/bin/bash

for x in $(echo $PATH |sed "s/:/ /g")
do
echo "Directories in your PATH which you cannot write are:"
echo $(find $x -perm /666 -type d -maxdepth 0 2>/dev/null
|xargs ls -dl | grep -v $USER)
done

exit 0;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Shell Script Interview Questions

what are special characters and explain how does text varies by the usage of single quotes,double quotes and back quotes?

1 Answers  


Write a shell script to get current date, time, user name and current working directory.

0 Answers  


How would you compare the strings in a shell script?

0 Answers  


What are the advantages of shell scripting?

0 Answers  


one folder contains lot of students name but I want to fetch hello with every student name individually using shell script

0 Answers  


Explain about shebang?

0 Answers  


What command needs to be used to take the backup?

0 Answers  


What are environment variables?

2 Answers  


Is shell scripting a language?

0 Answers  


write a program to display all the files from the current directory which are created in particular month

6 Answers  


How does shell scripting work?

0 Answers  


Explain about return code?

0 Answers  


Categories