LPIC-1 Exam 101 (Linux Administrator) — Question 38

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

Answer options

Correct answer: B

Explanation

Option B is correct because it first redirects standard output to 'filename' and then redirects standard error to the same destination as standard output. The other options either redirect output incorrectly or do not achieve the desired effect of combining both outputs into the same file.