1.

To check if the file exists and is executable we have to use ___ option with test.(a) -e(b) -f(c) -x(d) -wThis question was posed to me during an interview.The question is from Using test and [ ] to Evaluate Expressions in section Essential Shell Programming of Unix

Answer»

The correct answer is (c) -x

Easiest explanation: If we want to check whether the file exists and is EXECUTABLE we have to USE the -x option. The syntax is -x FILENAME.



Discussion

No Comment Found

Related InterviewSolutions