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

Please anyone suggest atleast 2 good training institutes in Hyderabad, INDIA where i can learn unix shell scripting.

1 Answers  


In a file , how to retrieve the lines which are the multiples of 50 ? like 50,100,150th lines etc.

9 Answers   Amazon,


How will you copy a file from one machine to other?

0 Answers  


Explain about login shell?

0 Answers  


write a shell program to check wheather a given string is pallindrome or not?

4 Answers  


How would you print just the 25th line in a file using smallest shell script?

4 Answers  


How do I start a shell script?

0 Answers  


What is shell company all about?

0 Answers  


What is the syntax of "grep" command?

4 Answers  


State the advantages of shell scripting?

0 Answers  


What are different types of shell?

0 Answers  


Create a bash shell script that reads in a number from the user. If the number is 1, print out the date. If the number is 2, list the files in the current directory. If the number is 3, print out who is currently logged onto the system. If the number is anything else, print out an error message and exit. Name this script "various.sh"

4 Answers  


Categories