Saturday, June 20, 2009

Understanding Cat commands

Cat key usage is to concatenate files together. In addition, cat command can be used to display files

1. To join files and display them on the screen
# cat file1 file2

2. To join 2 files together and save them on file 3
# cat file1 file2 > file3

3. To display the file with line numbering
# cat -n file1

No comments: