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...


write a shell script to check whether all the directories
in the path exist has read and write permission



write a shell script to check whether all the directories in the path exist has read and write per..

Answer / geichel

#!/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 2 No

Post New Answer

More Shell Script Interview Questions

Is shell a part of kernel?

0 Answers  


What is shell and shell script?

0 Answers  


Is bash a shell script?

0 Answers  


Which scripting language is best for automation?

0 Answers  


What is the difference between a 'thread' and a 'process'?

3 Answers  


How do you read arguments in a shell program - $1, $2 ..?

4 Answers  


What is computer cli?

0 Answers  


Why are shell scripts used?

0 Answers  


When should shell programming/scripting not be used?

0 Answers  


What are the two files of crontab command?

0 Answers  


What are script files?

0 Answers  


How will you print the login names of all users on a system?

0 Answers  


Categories