Compression, decompression command, different algorithm, compression ratio will also be different
Compression format: GZ, bz2, XZ, zip, Z
==================================================
gzip:. GZ
Gzip/path/to/somefile: The original file is deleted when the compression is complete
-D:
-#:1-9, specify the compression ratio, default is 6;
g un Zip:
Gunzip/path/to/somefile.gz: The original file will be deleted when the decompression is complete
Zcat/path/to/somefile.gz: To view the contents of a text file without being pressed
==================================================
BZIP2:. bz2
Compression tool with a greater compression ratio than gzip, using a format approximation
Bzip2/path/to/somefile
-D
-#: 1-9, default is 6
-K: Keep the original file when compressing
bunzip2/path/to/somefile.bz2
Bzcat
==================================================
XZ:. XZ
Xz/path/to/somefile
-D
-#: 1-9, default is 6
-K: Keep the original file when compressing
Unxz
Xzdec
Xzcat
installation package download Link: xz-5.2.2.tar.bz2 (1165 KiB)
==================================================
Zip: Both archived and compressed tools
Zip Filename.zip FILE1 FILE2 ...: Do not delete the original file after compression
Unzipfilename.zip
Archive: Archiving, archiving by itself does not imply compression
XZ, bz2, GZ
==================================================
Tar: Archive tool,. Tar
-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:bzip2
-JXF:
-jcf:xz
-JXF:
==================================================
Cpio: Archive Tool
Linux commands: Compression and decompression