commands for the common Unzip tool: gzip (. gz) bzip2 (. bz2) XZ (. xz) compress (. z) tar (. tar)
1.gzip
Syntax: gzip option FILE
Common options:-D-#-C
(1)-D decompression
Decompression method: "Gzip-d FILE"
(2)-# set compression ratio, default is 6 (range value is 1-9)
(3)-C compression when the source file is preserved while the compressed content is entered into the terminal, usually and redirected output ">" With
Command behavior when used together: gzip-c source file > Compressed text. GZ (does not output to the terminal, the compressed file is output to the specified text)
2.bzip2
Syntax: bzip2 option file
Common options:-D-#-K
(1)-D decompression
Unzip and gzip the same,
(2)-# specified compression ratio, compression ratio is also 6 (the value range is also 1-9)
(3)-K compression preserves the source files while the compressed files are automatically saved to the. bz2 (Automatically create files in this format). (and gzip not the same is not required to redirect the output to save the compressed file)
3.xz
Syntax: bzip2 option file
Common options:-D-#-K
(1)-D decompression
Unzip the way "Xz-d file" and "Unxz file"
(2)-# specify compression ratio, default is 6 (default range 1-9)
(3)-K compression preserves the source file while the compressed file is automatically saved to. bz2 (Automatically create this format file), (and Gzip does not need to redirect the output to save the compressed file)
4.compress
(1) Compressed files: Compress file (generates FILE.Z compressed files and deletes source files)
(2) Options:
-C compress-c File > file.z (Generate compressed files while preserving source files, redirect compressed files to save them)
-D decompression (equivalent to uncompress)
-# Specify compression ratio, default is 6 (default is 1-9)
Linux Unzip Tool