Compression ratios are different for each compression algorithm
GZIP: Compressed files are. gz format, so is the suffix
Gzip/path/to/somefile: The original file is deleted when the compression is complete, the compressed file is named after the source file, and the suffix is added automatically
Gunzip: Unzip files in. gz format and delete original files after decompression
Zcat: To view the contents of a text file without pressure. gz files
------------------------------------------------------------------
BZIP2: Compressed file is in. bz2 format, suffix is also true
Compression tool with a greater compression ratio than gzip, using a format approximation
Bzip2/path/to/somefile after compression is complete, the original file is deleted, the compressed file is named after the source file, and the suffix is added automatically
-K: Keep the original file when compressing
BUNZIP2: Unzip the. bz2 formatted file and delete the original file after decompression
Bzcat: Without pressure. bz2 file, view the contents of the text file
------------------------------------------------------------------
XZ: The compressed file is in. xz format, and the suffix is also
Xz/path/to/somefile after compression is complete, the original file is deleted, the compressed file is named after the source file, and the suffix is added automatically
-K: Keep the original file when compressing
UNXZ: Unzip the. xz format file and delete the original file after decompression
-------------------------------------------------------------------
Zip: Compressed file is in. zip format, suffix is also true
Zip Filename.zip FILE1 FILE2 ...: Do not delete the original file after compression
Unzip: Extract files in filename.zip format
-d specifies decompression to the specified path
-L View Compressed file contents, but not uncompressed
--------------------------------------------------------------------
Tar: Archive tool with a file suffix of. tar
Tar zcvf FILE.tar.gz FILE1
Common options:
-C: Create an archive file
-F File.tar: Archived files for operations
-X: Expand Archive
--xattrs: Preserves extended attribute information for files when archiving
-T: Do not expand the archive to directly see which files are archived
-ZCF: Archive and invoke gzip compression
-ZXF: Call gzip to unzip and expand Archive,-Z option to omit
-JCF: Archive and call bzip2 compression
-JXF: Call bzip2 to unzip and expand archive
-JCF: Archive and invoke XZ compression
-JXF: Call XZ to unzip and expand archive
This article is from the "Burning Brain" blog, so be sure to keep this source http://rsddn.blog.51cto.com/10840178/1828630
GZ, bz2, XZ, ZIP, format compression commands and tar usage on Linux operating systems