Here are 10 essential Linux commands for file compression:
- tar: Used to create compressed archive files. The basic syntax is
tar options destination source. - gzip: Used to compress files. The basic syntax is
gzip filename. This command replaces the original file with a compressed version. - gunzip: Used to decompress files compressed with gzip. The basic syntax is
gunzip filename.gz. - zip: Used to create compressed zip archives. The basic syntax is
zip options archive_name file1 file2 .... - unzip: Used to extract files from a zip archive. The basic syntax is
unzip archive_name. - bzip2: Used to compress files using the Burrows-Wheeler algorithm. The basic syntax is
bzip2 filename. This command replaces the original file with a compressed version. - bunzip2: Used to decompress files compressed with bzip2. The basic syntax is
bunzip2 filename.bz2. - xz: Used to compress files using the LZMA algorithm. The basic syntax is
xz filename. This command replaces the original file with a compressed version. - unxz: Used to decompress files compressed with xz. The basic syntax is
unxz filename.xz. - 7z: Used to create compressed 7z archives. The basic syntax is
7z options archive_name file1 file2 ....
You can consult the manual pages (man command_name) for more details and advanced usage of these commands.
