nerdexam
CompTIA

LX0-101 · Question #443

To prevent a command run as root from sending both standard out (stdout) and standard error (stderr) to any terminal or other file or device, which of the following strings should be appended to the…

The correct answer is C. >/dev/null 2>&1. See the full explanation below for the reasoning.

Question

To prevent a command run as root from sending both standard out (stdout) and standard error (stderr) to any terminal or other file or device, which of the following strings should be appended to the command?

Options

  • A
    /dev/null
  • B
    /dev/null 1>&2
  • C
    /dev/null 2>&1
  • D1>&2 >/dev/null
  • E2>&1 >/dev/null

How the community answered

(56 responses)
  • A
    2% (1)
  • B
    4% (2)
  • C
    73% (41)
  • D
    13% (7)
  • E
    9% (5)

Community Discussion

No community discussion yet for this question.

Full LX0-101 Practice