Compress a file:
gzip file (.gz format)
bzip2 file (.bz2 format, better)
lzma file (.lzma format, best compression)
Uncompress a file:
gunzip file.gz
bunzip2 file.bz2
unlzma file.lzma
Most Popular Articles
Commands for Handling files and directories
Create a directory: mkdir dir Create nested directories: mkdir -p dir1/dir2Changing...
Listing files
List all “regular” files (not starting with .) in the current directory:lsDisplay a long...
Displaying file contents
Concatenate and display file contents:cat file1 file2Display the contents of several files...
File name pattern matching
Concatenate all “regular” files: cat *Concatenate all “hidden” files: cat .*Concatenate all files...
Handling file contents
Show only the lines in a file containing a given substring: grep substring fileCase insensitive...