Multiple choice technology operating systems

what is the function of tee command in Unix?

  1. “tee” command is used to direct the output to print as well as directs it to a file.

  2. “tee” command is used to direct the output to a file.

  3. “tee” command is used to direct the output to print

  4. “tee” command is used to direct output of a command as an input for another command.

  5. All of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The Unix 'tee' command reads from standard input and writes to both standard output (screen/terminal) and one or more files simultaneously. This makes it ideal for viewing output in real-time while also saving it to a file. Option B is incorrect because tee does not only write to files. Option C is incorrect because tee does not only print. Option D describes piping (|), not tee.