Common compression tool after compressing file suffix
Compress/uncompress: . Z
Gzip/gunzip: . GZ
BZIP2/BUNZIP2: . bz2
XZ/UNXZ: . XZ
1, gzip/gunzip. GZ
gzip [OPTION] ... FILE ...
-D: Uncompressed, equivalent to Gunzip
-C: Outputs the result to standard output;
-#:1-9, specify the compression ratio;
Zcat: View text file contents without explicit expansion;
2, bzip2/bunzip2. bz2
bzip2 [OPTION] ... FILE ...
-k:keep, keep the original documents;
-D: Unzip
-#:1-9, compression ratio, default is 6;
Bzcat: View text file contents without explicit expansion;
3, Xz/unxz. XZ
bzip2 [OPTION] ... FILE ...
-k:keep, keep the original documents;
-D: Unzip
-#:1-9, compression ratio, default is 6;
Xzcat: View text file contents without explicit expansion;
4. Tar Archive tool
tar [OPTION] ...
Using absolute paths is error-prone
(1) Create an archive
-C to create-F for the specified document name is usually followed directly with the document option last
Tar-c-f/path/to/somefile.tar FILE ...
(2) View the list of files in the archive file
Tar-t-f/path/to/somefile.tar
(3) Expand archive
Tar-x-f/path/to/somefile.tar
Tar-x-f/path/to/somefile.tar-c/path/to/dir Expand to the specified folder
Combined with compression tool implementation: Archive and Compress
-z:gzip,-J:BZIP2,-J:XZ
Linux System Management-(7)-Compression and archiving