cat food Display the food file on the screen.
cat scratch fever Join the files scratch and fever and then displayt he result on the screen.
cat eats bird > DetailsAt11 Join the files eats and bird and save them in the file DetailsAt11.
Note that the original files that cat joins are not modified. For example, say the file eats contained these lines:
The Owl and the Pussy-Cat went to sea
In a beautiful pea-green boat.
Also say the file bird contained these lines:
They took some honey, and plenty of money
Wrapped up in a five-pound note.
After the preceding command, neither file would change, but a new file called DetailsAt11 would be created, containing all four lines:
The Owl and the Pussy-Cat went to sea
In a beautiful pea-green boat.
They took some honey, and plenty of money
Wrapped up in a five-pound note.
For more information on the cat command, see the cat manual.
Previous Lesson: Printing Linux Files
Next Lesson: Searching for Files
Comments (most recent first)
Joy (13 Jul 2010, 07:30)
Hi Bob,
Thanks a lot for providing useful tutorials. Recently in an interview I've been asked to write a script by which; 1) I can connect a remote host through ssh with passwd, 2) go to /home directory (cd /home), 3) check the size of that directory (du -h). I hope I'm correct for 2) & 3), however I'm clueless about 1); plz help.
hi (22 Apr 2010, 04:22)
Hi,
not realy, you need to make a scp tu get the file in local and then make the cat or make a ssh connection a make the cat on the remote machine. kind regard
Noel McShane (31 Mar 2010, 04:31)
Hi
Some very good examples on cat. Can you cat two remote files if you hvae ssh keys setup Regards Noel McShane |
|
|
![]() |
|
| <Send This Link to a Friend> <Bookmark This Page> | ||