nerdexam
LPI

102-500 · Question #178

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

Sign in or unlock 102-500 to reveal the answer and full explanation for question #178. The question stem and answer options stay visible for context.

Shells and Shell Scripting

Question

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

Options

  • AThey are equivalent options with the same behaviour.
  • BThe -f option tests for a regular file. The -e option tests for an empty file.
  • CBoth options check the existence of the path. The -f option also confirms that it is a regular file.
  • DThe -f option tests for a regular file. The -e option tests for an executable file.

Unlock 102-500 to see the answer

You've previewed enough free 102-500 questions. Unlock 102-500 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#test builtin#file existence#file type testing#shell conditionals
Full 102-500 Practice