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 the syntax of "grep" command?
What are the disadvantages of shell scripting?
How to open a read-only file in the shell?
Give some situations where typing error can destroy a program?
is there any command to find user password?
How to handle the delimiter unit seperator in Unix
What is a shell made of?
what is the difference between sh & bash shell?
How to print all the arguments provided to the script?
What is the difference between scripting and coding?
How will you list only the empty lines in a file (using grep)?
How to add some content in any file at some desired location without using VI or some other editor in UNIX