Multiple choice technology operating systems

What is the command used for redirecting the standard error (stderr) to a file?

  1. <

  2. >>

  3. 2>

  4. <2

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

In Unix shell redirection, file descriptors are numbered: 0 for stdin, 1 for stdout, and 2 for stderr. The '2>' operator specifically redirects stderr to a file. The single '>' overwrites, while '>>' appends, but '2>' is the key identifier for stderr redirection.