nerdexam
LPI

101-400 · Question #27

Which of the following shell redirections will write standard output and standard error output to a file named filename?

The correct answer is B. >filename 2>&1. See the full explanation below for the reasoning.

Question

Which of the following shell redirections will write standard output and standard error output to a file named filename?

Options

  • A2>&1 >filename
  • B
    filename 2>&1
  • C1>&2>filename
  • D
    filename
  • E1&2>filename

How the community answered

(38 responses)
  • A
    8% (3)
  • B
    74% (28)
  • C
    13% (5)
  • D
    3% (1)
  • E
    3% (1)

Community Discussion

No community discussion yet for this question.

Full 101-400 Practice