Computer Science Ques 316

Question: Which UNIX command would append a file called test to the end of a file called output?

Options:

A) Cat output, » test

B) Append output » test

C) Write output » text

D) Cat text » output

E) None of these

Show Answer

Answer:

Correct Answer: D

Solution:

  • The cat command reads one or more files and Prints them to standard output. The operator Can be used to combine multiple files into one. The operator» can be used to append (ad: data) to an existing file. eg, file 1» file 2 will append (add) the contents of file 1 to file 2 the end.