Linux Survival
Search
Primary Menu
Skip to content
Home
Blog
Testimonials
Linux Links
Command List
Contact
Search for:
Linux Survival
To send the output from a command such as "cat" to a file, you can use either '>' or '>>'. For example cat jabber wocky > poem would put the contents of "jabber" and "wocky", one after the other, in a new file called "poem". You can think of the '>' as an arrow pointing to where you want the output to go. In the above example, if "poem" already exists, then it will be over-written (i.e. it will be deleted before it is recreated). Sometimes that is what you want, but often you will want to keep the previous contents of a file and simply append to it (add to the end of it). This can be accomplished by using '>>' rather than '>'. Click the right arrow.
Page 44
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