nerdexam
CompTIA

LX0-101 · Question #301

Which of the following commands will send output from the program myapp to both standard output (stdout) and the file file1.log?

The correct answer is D. myapp | tee file1.log. See the full explanation below for the reasoning.

Question

Which of the following commands will send output from the program myapp to both standard output (stdout) and the file file1.log?

Options

  • Acat < myapp | cat > file1.log
  • Bmyapp 0>&1 | cat > file1.log
  • Cmyapp | cat > file1.log
  • Dmyapp | tee file1.log
  • Etee myapp file1.log

How the community answered

(66 responses)
  • A
    2% (1)
  • B
    8% (5)
  • C
    5% (3)
  • D
    85% (56)
  • E
    2% (1)

Community Discussion

No community discussion yet for this question.

Full LX0-101 Practice