| Developer's Daily | Unix by Example |
| main | java | perl | unix | DevDirectory |
| Command | cat |
| Description | The "cat" command lets you view text files. "cat" is short for concatenate. |
| Examples | cat /etc/passwd
cat /etc/profile
cat file1 file2 file3 > file4
|
The drawback of
the "cat"command (when displaying file contents to your
screen) is that the contents of the file may scroll off of the
screen. In cases where a file is to large to fit on the screen,
you're better off using the "more" command to display
the file. In fact, it's probably easier to use the more command all the time, and
just use the cat command to concatenate (merge) files.