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 shell is bin sh?
How to include comments in your shell scripts?
Script S1 (which copies .dat files from one directory1 to another directory2) run continuously. Write Script S2 which kills S1 first, compresses all .dat files in directory1 and directory2 successfully, re-run Script S1 and stops self i.e. S2.
What are the disadvantages of shell scripting?
What is path in shell script?
What is bash command used for?
What is the use of "shift" command in passing parameters?
write a shell script to find the largest number from 3 given numbers.
What is difference between bash and shell?
What is the default ubuntu terminal?
How do I edit a .sh file?