Meeeeeooooooww! - (Mon, 15 Mar 2010 20:19:23 +0000)
Meeow! I love cats, they are a million times better than dogs. This particular cat is a very clever cat.
cat stands for "concatenate and display". (Don't ask me how, I think it was developed by someone who thought t was the same as d) It is also a commad that tries to multitask, and doesn't really manage it very well. It must be male.
So let's deal with the display part first. cat displays the content of a file. It works fine if you have a short file. However, if you have a large file the contents will fly rapidly past you and you will only see the last page. That's great if you just want to see the last page, or can read like the robot in Short Circuit. If you want to see any other bits of the file then try the more comand instead.
The other thing that cat does is the "concatenate" part. The OED says that concatenate means "to chain together". It combines the contents of two things into another thing.
1. Open a terminal
2. Type cat file1 file2 > destination_file
3. Press return
More details:
| cat file1 file2 > destination_file | combines the contents of file1 and the contents of file2 and overwrites destination_file |
| cat file1 file2 >> destination_file | combines the contents of file1 and the contents of file2 and adds it to the end of destination_file |