nerdexam
LPI

101-500 · Question #500

Which of the following commands displays the output of the foo command on the screen and also writes it to a file called /tmp/foodata?

The correct answer is D. foo | tee /tmp/foodata. You've hit your Sonnet limit · resets Jun 8, 9am (UTC)

GNU and Unix Commands

Question

Which of the following commands displays the output of the foo command on the screen and also writes it to a file called /tmp/foodata?

Options

  • Afoo | less /tmp/foodata
  • Bfoo | cp /tmp/foodata
  • Cfoo > /tmp/foodata
  • Dfoo | tee /tmp/foodata
  • Efoo > stdout >> /tmp/foodata

How the community answered

(65 responses)
  • A
    2% (1)
  • B
    6% (4)
  • C
    2% (1)
  • D
    88% (57)
  • E
    3% (2)

Explanation

You've hit your Sonnet limit · resets Jun 8, 9am (UTC)

Topics

#output redirection#tee command#pipes#stdout

Community Discussion

No community discussion yet for this question.

Full 101-500 Practice