Multiple choice technology operating systems

What is the result of doing the following? date >> file

  1. The date output is redirected to the file.

  2. The date output is redirected and appended to the end of the file.

  3. The date output is redirected and appended to the beginning of the file.

  4. None of the above

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

The '>>' operator redirects stdout to a file and appends to the end rather than overwriting. 'date >> file' executes the date command and adds its output to the file's end. If the file doesn't exist, it will be created. The '>' operator alone would overwrite the file contents.