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

What is the difference between break and continue commands?

0 Answers  


What is eval in shell script?

0 Answers  


Where cron file kept?

2 Answers   Tech Mahindra,


What is shell company all about?

0 Answers  


What is the syntax of "nested if statement" in shell scripting?

0 Answers  


What is the first line of a shell script called?

0 Answers  


How can you find out how long the system has been running?

0 Answers  


How do scripts work?

0 Answers  


What is the way to do multilevel if-else's in shell scripting?

0 Answers  


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

4 Answers  


What is path in shell script?

0 Answers  


Write a shell script to get current date, time, user name and current working directory.

0 Answers  


Categories