<tt>cat</tt>: Concatenate



next up previous contents
Next: more: Browser Up: File system Commands: Previous: rm: Remove

cat: Concatenate

cat filename...
where filename... may be one or more files.

cat displays the content of filename... on the standard output. If more than one file is used, they are displayed one after the other creating a larger file.

Output redirection may be used to copy the contents of files into another file. An example is

cat *.c > tot.cprog

This will copy the contents of all files ending with .c, into file tot.cprog. The order of the files within tot.cprog will be alphabetical.

cat can be used to append one file to another:

cat file2 >> file1
will append file2 to file1.



Super-User
Fri Feb 17 15:55:40 EST 1995