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
Why is used in shell scripting?
Explain about "s" permission bit in a file?
What is $1 in shell scripting?
Is powershell a language?
Explain about the slow execution speed of shells?
What is path variable bash?
What does .sh file contain?
What is path in shell script?
Print a given number, in reverse order using a shell script such that the input is provided using command line argument only.
c program to implement unix/linux command to block the signal ctrl-c and ctrl-\ signal during the execution ls -l|wc -l
Which scripting language is best for automation?
What is the syntax of while loop in shell scripting?
Write a command sequence to find the count of each word?
What is the purpose of scripting?
How do I set bash as default shell mac?