nerdexam
LPI

117-010 · Question #34

How can the normal output of a command be written to a file while discarding the error output?

The correct answer is E. command >file 2>/dev/null. See the full explanation below for the reasoning.

Question

How can the normal output of a command be written to a file while discarding the error output?

Options

  • Acommand >2>file 1&>/dev/null
  • Bcommand < output > /dev/null
  • Ccommand > discard-error > file
  • Dcommand > /dev/null 2&>1 output
  • Ecommand >file 2>/dev/null

How the community answered

(27 responses)
  • A
    11% (3)
  • B
    7% (2)
  • C
    4% (1)
  • D
    4% (1)
  • E
    74% (20)

Community Discussion

No community discussion yet for this question.

Full 117-010 Practice