nerdexam
LPI

101-500 · 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. You've hit your Sonnet limit · resets Jun 8, 9am (UTC)

Shells and Shell Scripting

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

(53 responses)
  • B
    87% (46)
  • C
    4% (2)
  • D
    2% (1)
  • E
    8% (4)

Explanation

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

Topics

#shell redirections#file descriptors#stdout/stderr#I/O redirection

Community Discussion

No community discussion yet for this question.

Full 101-500 Practice