Results 1 to 7 of 7
What does the command cat do?
The manual (man cat) uses the word 'concatenate' and describes it as a command that concatenate files but I honestly didn't understand a word...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-30-2005 #1
In plain English please...
What does the command cat do?
The manual (man cat) uses the word 'concatenate' and describes it as a command that concatenate files but I honestly didn't understand a word
-D-
Registered User # 402675
- 11-30-2005 #2Linux Newbie
- Join Date
- Jun 2005
- Posts
- 123
If you look up the word "concatenate" on either Dictionary.com or define: you'll easily find what it does.
It basically takes 'n' number of documents and merges them into one, then lists them. n can be 1.
It has other rarely used features.
- 11-30-2005 #3
i use the cat command to view text documents
- 11-30-2005 #4
Just like the fella above said, cat can be used to view text files. Here's an example. You are about to compile a package called, zippolibrary from source. You download the files, unpack them and - in a terminal - navigate to the correct directory.
You see some text files in there. One is called INSTALL the other is README.
You type cat INSTALL
You type cat README
You feel much better and really well informed.
You could achieve similar results with the less or more commands.
less INSTALL
more README
I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso
- 11-30-2005 #5Linux Engineer
- Join Date
- Mar 2005
- Posts
- 1,431
Also cat can be used to check if your mouse works correctly; cat /dev/input/mice
I usually use cat on small text files (the big ones are for "less") or in scripts which should print/process a given text file.
- 11-30-2005 #6
I'd like to go into usage a little bit.
cat's best known purpose is, of course, printing out a file to the terminal:
However, it is also capable of putting two files together in one (concattenating them):Code:cat ~/.bashrc
This puts test1 and test2 together into a file called 'test'.Code:cat test1 test2 > test
- 11-30-2005 #7
Interesting... From what I was reading in the book "How Linux works" I thought that this command was inocent but after seeing the thread...
-D-
Registered User # 402675


Reply With Quote
