Concatenate and print files (POSIX)
cat [-c] [-n|-r] [-u] [file...]
The cat utility reads files in the order you specify and writes their contents to standard output.
Write the contents of myfile to standard output:
Concatenate doc1 and doc2 and write the result to doc.all:
cat doc1 doc2 > doc.all
Because of the shell language mechanism used to perform output redirection, a command such as:
cat doc doc.end > doc
causes the original data in doc to be lost. The file doc is opened for write by the shell, and therefore truncated to zero length, before cat is executed.
cp, head, tail