1, Gzip/gunzip/zcat
gzip [OPTION] ... FILE ...
-D: Decompression, equivalent to Gunzip;
-#: Specify the compression ratio, the default is 6; the larger the number, the greater the compression ratio (1-9);
-C: Output the compression result to standard output;
Gzip-c FILE >/path/to/somefile.gz
2, Bzip2/bunzip2/bzcat
bzip2 [OPTION] ... FILE ...
-D: Unzip
-#: Specify the compression ratio; the default is 6; the higher the number, the greater the compression ratio (1-9);
-k:keep, keep the original documents;
3, Xz/unxz/xzcat
XZ [OPTION] ... FILE ...
-D: Unzip
-#: Specify the compression ratio; the default is 6; the higher the number, the greater the compression ratio (1-9);
-K: Keep the original file;
4. Tar command: Archive, equivalent to packaging
tar [OPTION] ... FILE ...
(1) Create an archive
-c-f/path/to/somefile.tar FILE ...
-cf/path/to/somefile.tar FILE ...
(2) Expand archive
-xf/path/from/somefile.tar
-xf/path/from/somefile.tar-c/path/to/somedir
(3) View file list of archived files
-tf/path/to/somefile.tar
After the completion of the archive usually need to compress, the result of the previous compression tool, can be implemented to compress multiple files;
(4) Archive compression
-z:gzip2
-zcf/path/to/somefile.tar.gz FILE ...
Unzip and expand Archive:-zxf/path/to/somefile.tar.gz
-j:bzip2
-jcf
-jxf
-j:xz
-jcf
-jxf
Zip:
Zip/unzip
Suffix name:. zip
This article is from the "Wang Liming" blog, make sure to keep this source http://afterdawn.blog.51cto.com/7503144/1864283
Compression decompression command on Linux