Gzip gunzip zcat bzip2 bunzip2 bzcat xz unxz xzcat
A:gzip usage
# gzip file Compressed files do not retain source files directly generated file.gz
# Zcat file.gz can temporarily save file.gz compressed files to other space in the terminal output for display viewing
# gzip-d file.gz uncompressed file with the same # Gunzip file.gz
# gzip-c File >/path/to/file.gz can keep the original files and then save the compressed file to a different location path
# gzip-9 File Number 9 is the compression level default system is 6 level is not recommended to modify the level of the compressed file the more compressed the more ruthless
B. bZIP usage
# BZIP2 file Compressed files directly generated file.bz2
# bzip2-9 file Compressed files have the same level as above
# bzip2-d file.bz2 uncompressed file with the same # BUNZIP2 file.bz2
# bzip2-k file plus k option preserves the original files to generate a new file file.bz2
# Bzcat FILE.BZ2 Save compressed files in other space displayed in terminal
C. XZ usage is now the best tool to meet the performance
# XZ file Compressed files directly generated FILE.XZ
# Xz-k Keep original file generated File.xz
# xz-d FILE.XZ uncompressed file with the same # UNXZ FILE.XZ
# UNXZ FILE.XZ Save the compressed file to the rest of the system and display it in the terminal to view
# Xzcat FILE.BZ2 Save compressed files in other space displayed in terminal
Notice: The above tools can only compress files that do not support directory compression
Linux Compression Tools