write a shell script to check whether all the directories
in the path exist has read and write permission
Answer / geichel
#!/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 | 2 No |
What is shell chemistry?
How to create environment variables?What are the conditions for creating variables?
What will happen to my current process when I execute a command using exec?
I want to create a directory such that anyone in the group can create a file and access any person's file in it but none should be able to delete a file other than the one created by himself.
What is eval in shell script?
What can you do with powershell?
What is difference between bash and shell?
What does sh mean?
How does shell scripting work?
What are the zombie processes?
I want to upload a file to remote server through ftp daily.Can anyone suggest how to make a shell script for that.I hv credentials for that ftp
What is option in shell script?