c program to check whether all the directories in the path
exists has read and write permission



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

Post New Answer

More Shell Script Interview Questions

How do you know which shell I am using?

0 Answers  


How to check if the previous command was run successfully?

0 Answers  


What language is shell scripting?

0 Answers  


Hi Friends, I am currently Undergoing Course On Testing.I am Planning To Keep Fake Resume.Can any One tell me the ways to Prepare i.e, Real Time experience For Manual Testing. With Regards, Vikram

1 Answers  


What is awk script?

0 Answers  






How to redirect both standard output and standard error to the same location?

0 Answers  


If one dont know how to create a script then how he/she can use the QTP?

1 Answers  


c program the catches the ctrl-c(SIGINT) Signal for the first time and prints a output rather and exit on pressing Ctrl-C again

2 Answers  


What language is used in terminal?

0 Answers  


What is gui scripting?

0 Answers  


Write a command sequence to find the count of each word?

0 Answers  


Why is it called a shell?

0 Answers  


Categories