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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is used in shell scripting?

1003


Explain about "s" permission bit in a file?

1060


What is $1 in shell scripting?

1042


Is powershell a language?

1051


Explain about the slow execution speed of shells?

1232


What is path variable bash?

1044


What does .sh file contain?

961


What is path in shell script?

1097


Print a given number, in reverse order using a shell script such that the input is provided using command line argument only.

1158


c program to implement unix/linux command to block the signal ctrl-c and ctrl-\ signal during the execution ls -l|wc -l

3765


Which scripting language is best for automation?

962


What is the syntax of while loop in shell scripting?

1047


Write a command sequence to find the count of each word?

994


What is the purpose of scripting?

1088


How do I set bash as default shell mac?

1012