Multiple choice technology operating systems

What do you use to forward errors to a file ?

  1. 1> filename

  2. 2> filename

  3. 2> /dev/null

  4. &> filename

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In Unix/Linux, '2>' redirects stderr (file descriptor 2) to a file. '1>' redirects stdout (though usually just '>' is used), '2> /dev/null' discards errors, and '&>' redirects both stdout and stderr together.