Linux Survival
Search
Primary Menu
Skip to content
Home
Blog
Testimonials
Linux Links
Command List
Contact
Search for:
Linux Survival
Now that you know where Jester's joke files are located, you can send them to the printer. However, if you print each of the joke files separately, then they will be printed on separate pages. In the interest of saving paper, you decide to combine these two files into one and then print the new file. Since you do not have permission to create files in Jester's home directory, you will create the combined file in your own home directory. Before you begin, we need to explain how to combine files. Another word for "combine" is "concatenate". Since that would be a real pain to spell all of the time, the Linux concatenation command is simply "cat". For example, if you wanted to combine files "jabber" and "wocky", you would type cat jabber wocky This would print the contents of "jabber" and then "wocky" to your screen. "But," you may be saying, "what use is it to have these combined files printed to the screen? I want to create a new file with their contents." You're right. It's almost entirely useless to have "cat" send its output to your screen. But, in order to send its output to a file, you need to learn another new technique, which we'll cover in a couple of pages. For now, let's just ease our way into it. By the way, you can also combine more than two files simply by adding more filenames to the end of the command. You can even use this command with just one filename argument, in which case, that file's contents alone will be printed to the screen. In fact, many people use "cat", rather than "more", to display the contents of a file. However, we do not recommend using "cat" in this way, since it is not nearly as useful as "more". Click the right arrow.
jabber 'Twas brillig, and the slithy toves Did gyre and gimble in the wabe: All mimsy were the borogoves, And the mome raths outgrabe. wocky "Beware the Jabberwock, my son! The jaws that bite, the claws that catch! Beware the Jubjub bird, and shun the frumious Bandersnatch!" cat jabber wocky 'Twas brillig, and the slithy toves Did gyre and gimble in the wabe: All mimsy were the borogoves, And the mome raths outgrabe. "Beware the Jabberwock, my son! The jaws that bite, the claws that catch! Beware the Jubjub bird, and shun the frumious Bandersnatch!"
Page 42
Where learning Linux is easy
Module 1 Introduction
Directory Structure
List Directory
View File Contents
Create Directory
Move and Rename File
Change Directory
Get Current Location
Quiz 1
End of Module 1
Module 2 Introduction
Pathnames
Copy File
Remove File
Remove Directory
File Security
Change File Permissions
Wildcards
Groups Memberships
Quiz 2
End of Module 2
Module 3 Introduction
Home Directories
Manual Pages
User Information
Find File
Concatenate Files
Redirect Output
Print
Print Job Status
Cancel Print Job
Quiz 3
End of Module 3
Module 4 Introduction
Copy Tree
Disk Space
Remove Tree
Process Status
Pipe Output
Pattern Matching
Kill Process
Quiz 4
Conclusion