LPI
101-500 · Question #283
101-500 Question #283: Real Exam Question with Answer & Explanation
The correct answer is C. >/dev/null 2>&1. You've hit your Sonnet limit · resets Jun 8, 9am (UTC)
Shells and Shell Scripting
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
Explanation
You've hit your Sonnet limit · resets Jun 8, 9am (UTC)
Topics
#I/O redirection#file descriptors#stderr and stdout#shell operators
Community Discussion
No community discussion yet for this question.