Working with Files

CommandSyntax (Example)Description
catcat <file>Most commonly used to display the contents of a file. Derived from the word "concatenate," which it also does.
chattrchattr <option> fileChanges the ext2 attribute of a file. Some options available only to UID 0.
cpcp <source> < dest>Copies a file.
dddd if=input of=outputMost commonly used to convert a file. Can be used to copy image files from one device to another device or file.
filefile <file>Determines the type of a given file.
grepgrep <pattern> < file>Searches a file or files for a specified pattern.
gzipgzip <name>Compresses a file using Lempel-Ziv coding. Files compressed with this utility have a .gz suffix.
gunzipgunzip <name>Decompresses a gzipped file.
lessless <file> 
 cat ...

Get Special Edition Using Linux®, Sixth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.