Name

cat - Concatenate and print

Syntax

cat file

Description

Typically, cat is used to show the contents of a file. Any type of file can be displayed, but files containing ASCII text produce the only meaningful results.

Example:

cat login

This displays the contents of your login script. More than one file can be shown by giving cat a list of file names.

Cat can be used to redirect a file to another file or device, including appending output to existing files (hence, concatenation). Examples:

cat net.report >.printer cat intro userlist contacts >>memo

The first example sends the net.report file to the printer device. The second example appends the files intro, userlist, and contacts, to the end of memo.

See Also

grep(C), lpr(C), more(C), tail(C)