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

write a shell script to identify the given string is palindrome or not?

17 Answers   CTS, HP, IBM, InfoEst, Wipro,


What is scripting used for?

0 Answers  


What is in a script?

0 Answers  


how to search for vowels a,e,i,o,u appearing in the same sequence in a file

4 Answers   Amazon,


How do you find out What is your shell?

0 Answers  


How to get script name inside a script?

0 Answers  


Explain about echo command?

0 Answers  


How do I run a powershell script?

0 Answers  


how to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?

0 Answers  


madhar chod unix ke 10 commands dhang se likh nahi sakta hai

0 Answers   Cap Gemini,


What is basename in shell script?

0 Answers  


What are the different types of variables used in shell script?

0 Answers  


Categories