Novell Certified Linux Professional (CLP) — Question 1
You do not want to see any error messages when using the find command; you want to see only the results.
Which command accomplishes this task?
Answer options
- A. find /etc -name "*conf" 3>/dev/null
- B. find /etc -name "*conf" 0>/dev/null
- C. find /etc -name "*conf" 2>/dev/null
- D. find /etc -name "*conf" 1>/dev/null
Correct answer: D
Explanation
The correct answer is D because redirecting file descriptor 1 (stdout) to /dev/null will suppress the output of the command. Option A redirects file descriptor 3, which is not used by the find command, while option B redirects file descriptor 0 (stdin) and option C redirects file descriptor 2 (stderr), which would still show error messages.