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 |
What is bash used for?
What are types of shells?
What are the different variables present in linux shell?
Where cron file kept?
Print the 10th line without using tail and head command.
how to read systems current date and time
How to find duplicate record in file using shell script?
0 Answers IBM, Saama Tech, Wipro,
What is a file basename?
What is the syntax of "grep" command?
Can shell script run on windows?
What is an sh file?
write a non recursive shell script that accepts any number of arguments and prints them in the reverse order