Common commands for packaging, compression, and decompression in Linux :. tar unpack: tarxvfFileName.tar package: tarcvfFileName.tar DirName note: tar is packed, not compressed & mdash; & mdash; & mdas
Common commands for packaging, compression, and decompression in Linux:
. 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
---------------
. Tar. bz
Decompress: tar jxvf FileName.tar. bz
---------------
. 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.
This article is from the "richard's note" blog