. Tar
Unpack: Tar xvf filename.tar
Package: Tar CVF filename.tar dirname
(Note: tar is packed, not compressed !)
---------------
. GZ
Decompress 1: gunzip filename.gz
Decompress 2: gzip-D filename.gz
Compression: gzip filename
.Tar.gz and. tgz
Decompress: Tar zxvf filename.tar.gz
Compression: Tar zcvf filename.tar.gz dirname
---------------
. Bz2
Decompress 1: Bzip2-D filename.bz2
Decompress 2: bunzip2 filename.bz2
Compression: Bzip2-Z filename
.Tar.bz2
Decompress: Tar jxvf filename.tar.bz2
Compression: Tar jcvf filename.tar.bz2 dirname
---------------
. Bz
Extract 1: Bzip2-D filename. bz
Decompress 2: bunzip2 filename. bz
Compression: Unknown
. Tar. bz
Decompress: Tar jxvf filename.tar. bz
Compression: Unknown
---------------
. Z
Decompress: uncompress filename. Z
Compression: compress filename
. Tar. Z
Decompress: Tar zxvf filename.tar. Z
Compression: Tar zcvf filename.tar. Z dirname
---------------
. Zip
Decompress: unzip filename.zip
Compression: Zip filename.zip dirname
---------------
. Rar
Decompress: RAR x filename.rar
Compression: rar a filename.rar dirname
---------------
. LHA
Decompress: LHA-e filename. LHA
Compression: LHA-a filename. LHA filename
---------------
. Rpm
Unpack: rpm2cpio filename. RPM | cpio-Div
---------------
. Deb
Unpack: Ar P filename. Deb data.tar.gz | tar zxf-
---------------
. Tar. tgz .tar.gz. tar. z. tar. BZ .tar.bz2. zip. cpio. rpm. deb. SLP. ARJ. RAR. ace. lha. lzh. LZX. LZs. ARC. SDA. SFX. lnx. zoo. cab. kar. CPT. pit. sit. sea
Decompress: Sex x filename .*
Compression: Sex a filename. * filename
Sex is only related to callProgram, It does not have the compression and decompression functions. Please note!
Gzip command
There are two obvious advantages to reduce the file size. One is to reduce the storage space, and the other is to reduce the transmission time when the file is transmitted over the network. Gzip is a frequently used command in Linux to compress and decompress files, which is convenient and easy to use.
Syntax: gzip [Option] compressed (decompressed) file name the meaning of each option of this command is as follows:
-C writes the output to the standard output and keeps the original file. -D. decompress the compressed file. -L the following fields are displayed for each compressed file: size of the compressed file, size of the uncompressed file, and compression ratio; name of the uncompressed file-r recursively searches for the specified directory and compresses all the files or decompress them. -T test to check whether the compressed file is complete. -V displays the file name and compression ratio for each compressed and decompressed file. -Num uses the specified numeric num to adjust the compression speed.-1 or -- fast indicates the fastest compression method (low compression ratio), and-9 or -- best indicates the slowest compression method (high compression ratio ). The default value is 6. Command instance:
Gzip * % compresses each file in the current directory into A. GZ file. Gzip-DV * % decompress each compressed file in the current directory and list detailed information. Gzip-L * % detailed information of each compressed file in Example 1 is displayed without decompression. Gzip usr.tar %: the compressed tar backup file usr.tar. the extension name of the compressed file is .tar.gz.
. Tar
Unpack: Tar xvf filename.tar
Package: Tar CVF filename.tar dirname
(Note: tar is packed, not compressed !)
---------------
. GZ
Decompress 1: gunzip filename.gz
Decompress 2: gzip-D filename.gz
Compression: gzip filename
.Tar.gz and. tgz
Decompress: Tar zxvf filename.tar.gz
Compression: Tar zcvf filename.tar.gz dirname
---------------
. Bz2
Decompress 1: Bzip2-D filename.bz2
Decompress 2: bunzip2 filename.bz2
Compression: Bzip2-Z filename
.Tar.bz2
Decompress: Tar jxvf filename.tar.bz2
Compression: Tar jcvf filename.tar.bz2 dirname
---------------
. Bz
Extract 1: Bzip2-D filename. bz
Decompress 2: bunzip2 filename. bz
Compression: Unknown
. Tar. bz
Decompress: Tar jxvf filename.tar. bz
Compression: Unknown
---------------
. Z
Decompress: uncompress filename. Z
Compression: compress filename
. Tar. Z
Decompress: Tar zxvf filename.tar. Z
Compression: Tar zcvf filename.tar. Z dirname
---------------
. Zip
Decompress: unzip filename.zip
Compression: Zip filename.zip dirname
---------------
. Rar
Decompress: RAR x filename.rar
Compression: rar a filename.rar dirname
---------------
. LHA
Decompress: LHA-e filename. LHA
Compression: LHA-a filename. LHA filename
---------------
. Rpm
Unpack: rpm2cpio filename. RPM | cpio-Div
---------------
. Deb
Unpack: Ar P filename. Deb data.tar.gz | tar zxf-
---------------
. Tar. tgz .tar.gz. tar. z. tar. BZ .tar.bz2. zip. cpio. rpm. deb. SLP. ARJ. RAR. ace. lha. lzh. LZX. LZs. ARC. SDA. SFX. lnx. zoo. cab. kar. CPT. pit. sit. sea
Decompress: Sex x filename .*
Compression: Sex a filename. * filename
Sex only calls related programs and does not support compression or decompression. Please note!
Gzip command
There are two obvious advantages to reduce the file size. One is to reduce the storage space, and the other is to reduce the transmission time when the file is transmitted over the network. Gzip is a frequently used command in Linux to compress and decompress files, which is convenient and easy to use.
Syntax: gzip [Option] compressed (decompressed) file name the meaning of each option of this command is as follows:
-C writes the output to the standard output and keeps the original file. -D. decompress the compressed file. -L the following fields are displayed for each compressed file: size of the compressed file, size of the uncompressed file, and compression ratio; name of the uncompressed file-r recursively searches for the specified directory and compresses all the files or decompress them. -T test to check whether the compressed file is complete. -V displays the file name and compression ratio for each compressed and decompressed file. -Num uses the specified numeric num to adjust the compression speed.-1 or -- fast indicates the fastest compression method (low compression ratio), and-9 or -- best indicates the slowest compression method (high compression ratio ). The default value is 6. Command instance:
Gzip * % compresses each file in the current directory into A. GZ file. Gzip-DV * % decompress each compressed file in the current directory and list detailed information. Gzip-L * % detailed information of each compressed file in Example 1 is displayed without decompression. Gzip usr.tar %: the compressed tar backup file usr.tar. the extension name of the compressed file is .tar.gz.