Multiple choice technology operating systems

Which of these commands redirects the output of cat testfile to redirfile without overwriting the contents of redirfile?

  1. cat testfile >redirfile

  2. cat testfile >>redirfile

  3. cat testfile 1> redirfile

  4. cat testfile 2> redirfile

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

The >> operator redirects output and appends to a file without overwriting existing contents. The single > operator would overwrite. 1> redirects stdout specifically (overwrites), and 2> redirects stderr (also overwrites).