Multiple choice technology operating systems

"Out put of the following commands.cat file1>file1 and cat par.3 par.4 par.5 >> report "

  1. Append the content in file1 and cat par.3 par.4 par.5 >> report -> contents of files par.2 par.4 par.5 appended to file report

  2. cat file1>file1 - file emptied and cat par.3 par.4 par.5 >> report -> contents of files par.2 par.4 par.5 appended to file report

  3. Both will do the same poeration. Will append the data to the destination files.

  4. cat file1>file1 - Wont do any operation in file 1 and cat par.3 par.4 par.5 >> report -> contents of files par.2 par.4 par.5 appended to file report

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

Running cat file1 > file1 empties the file because the shell truncates file1 for writing before cat can read it. The >> operator in the second command appends the specified files to report. Other options fail to recognize this truncation behavior.