Linux file compression commands reduce the size of files and directories by compressing them, so they are easier to store and transfer. Multiple files and directories can be grouped and stored as a single archive file with archiving commands.
Command | Description |
---|---|
tar | It is used to create and extract archives in tar format. |
gzip | It is used to compress files and directories in gzip format. |
gunzip | It is used to decompress files and directories in gzip format. |
bzip2 | Used to compress files and directories in bzip2 format. |
bunzip2 | Used to decompress files and directories in bzip2 format. |
zip | Used to create and extract archives in zip format. |
unzip | Used to extract archives in zip format. |
rar | Used to create and extract archives in rar format. |
unrar | Used to extract archives in rar format. |
7z | Used to create and extract archives in 7z format. |
un7z | Used to extract archives in 7z format. |
ar | Used to create and extract archives in Unix ar format. |
cpio | Used to create and extract archives in cpio format. |
compress | Used to compress files in compress format. |
uncompress | Used to decompress files in compress format. |
xz | Used to compress files and directories in xz format, which is a high compression ratio format. The corresponding decompression command is "unxz". |
lzma | Used to compress files and directories in lzma format, which also has a high compression ratio. The corresponding decompression command is "unlzma". |
tar.bz2 | Used to create and extract archives in tar formats that are compressed with bzip2. The corresponding decompression command is "tar -xjf". |
tar.gz | Used to create and extract archives in tar formats that are compressed with gzip. The corresponding decompression command is "tar -xzf". |
zcat | Used to view the contents of a file that has been compressed with gzip, without decompressing it. |
bzcat | Used to view the contents of a file that has been compressed with bzip2, without decompressing it. |
arj | Used to create and extract archives in arj format. The corresponding decompression command is "unarj". |
cabextract | Used to extract files from archives in Microsoft Cabinet (CAB) format. |
rpm2cpio | Used to convert RPM package files to cpio format, which can then be extracted using the "cpio" command. |
p7zip | Used to create and extract archives in 7z format and other formats, with support for AES-256 encryption. |