linux for blondes

... the home of the world's ch1x0rs ...

Technology is all around us, and so it should be. Today we rely on tech in everything we do. Linux is no longer reserved for the basement of a few geeks - it is a world wide phenomenon which everyone needs to know about. Linuxforblondes.com is a blog/website which discusses the important details of both linux and anything vaguely related. True to the title, the website has a blonde streak and and so we like to feature anything that sparkles or can be ordered in pink/purple!

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