Free CompTIA Linux+ XK0-005 Practice Question

An administrator is writing a shell script where the output of a command needs to be both displayed on the screen and written to a file for logging purposes. Which command and operator should the administrator use to achieve this?

  • Appending the output to a file using the >> operator

  • Using the tee command with the | operator

  • Redirecting output using the > operator

  • Piping the output to another command with the | operator

This question's topic:
CompTIA Linux+ XK0-005 / 
Scripting, Containers, and Automation
Your Score:

Check or uncheck an objective to set which questions you will receive.

SAVE $45