Free LFCS Exam Braindumps (page: 2)

Page 1 of 66

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

  1. They are equivalent options with the same behaviour.
  2. The -f option tests for a regular file. The -e option tests for an empty file.
  3. Both options check the existence of the path. The -f option also confirms that it is a regular file.
  4. The -f option tests for a regular file. The -e option tests for an executable file.

Answer(s): C



Which of the following commands moves and resumes in the background the last stopped shell job?

  1. run
  2. bg
  3. fg
  4. back

Answer(s): B



What is the effect of the egrep command when the -v option is used?

  1. It enables color to highlight matching parts.
  2. It only outputs non-matching lines.
  3. It shows the command's version information.
  4. It changes theoutput order showing the last matching line first.

Answer(s): B



When running the command
sed -e "s/a/b/" /tmp/file >/tmp/file
While /tmp/file contains data, why is /tmp/file empty afterwards?

  1. The file order is incorrect. The destination file must be mentioned before the command to ensure redirection.
  2. The command sed did not match anything in that file therefore the output is empty.
  3. When the shell establishes the redirection it overwrites the target file before the redirected command starts and opens it for reading.
  4. Redirection for shell commands do not work using the > character. It only works using the | character instead.

Answer(s): C






Post your Comments and Discuss Linux Foundation LFCS exam with other Community members:

LFCS Discussions & Posts