What do you use to forward errors to a file?
-
1> filename
-
2> /dev/null
-
&> filename
-
2> filename
D
Correct answer
Explanation
In Unix and Linux shells, file descriptor 2 represents standard error (stderr). Using 2> filename redirects standard error output to the specified file, whereas 1> handles standard output and &> captures both.