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
What is shift command in shell script?
What is computer cli?
Is shell scripting easy to learn?
What are the different types of shell scripting?
What exactly is a shell?
Is shell and terminal the same?
How many fields are present in a crontab file and what does each field specify?
What happens when you type ls?
What does echo $0 do?
Is shell scripting useful?
How are shells born?
Is bash an operating system?
What are the four fundamental components of every file system on linux?
What is the first line in a shell script?
Explain about the slow execution speed of shells?