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

What is shift command in shell script?

980


What is computer cli?

861


Is shell scripting easy to learn?

980


What are the different types of shell scripting?

1056


What exactly is a shell?

1028


Is shell and terminal the same?

1006


How many fields are present in a crontab file and what does each field specify?

1078


What happens when you type ls?

947


What does echo $0 do?

934


Is shell scripting useful?

1011


How are shells born?

926


Is bash an operating system?

940


What are the four fundamental components of every file system on linux?

1640


What is the first line in a shell script?

1048


Explain about the slow execution speed of shells?

1186