Exam LFCS All QuestionsBrowse all questions from this exam
Question 118

What is the difference between the commands test -e path and test -f path?

    Correct Answer: C

    The test -e path command checks if the path exists, regardless of the type of file. The test -f path command checks if the path exists and is a regular file. Therefore, the -f option has an additional requirement compared to the -e option.

Discussion
BorbzOption: C

-e FILE FILE exists -f FILE FILE exists and is a regular file Answer is correct.