Linux decompression file command:
.tar
Unpacking: tar xvf FileName.tar
Packing: tar cvf FileName.tar DirName
(Note: tar is packaging, not compression!)
.gz
Decompression 1: gunzip FileName.gz
Decompression 2: gzip -d FileName.gz
Compress: gzip FileName
.tar.gz and .tgz
Decompress: tar zxvf FileName.tar.gz
Compression: tar zcvf FileName.tar.gz DirName
.bz2
Decompression 1: bzip2 -d FileName.bz2
Decompression 2 : bunzip2 FileName.bz2
Compress: bzip2 -z FileName
.tar.bz2
Decompress: tar jxvf FileName.tar.bz2
Compression: tar jcvf FileName.tar.bz2 DirName
.bz
Decompression 1: bzip2 -d FileName.bz
Decompression 2: bunzip2 FileName. bz
compression: unknown
.tar.bz
decompression: tar jxvf FileName.tar.bz
compression: unknown
p>
.Z
Decompression: uncompress FileName.Z
Compression: compress FileName
.tar.Z
Decompression : tar Zxvf FileName.tar.Z
Compress: tar Zcvf FileName.tar.Z DirName
.zip
Decompress: unzip FileName.zip
Compression: zip FileName.zip DirName
.rar
Decompression: rar x FileName.rar
Compression: rar a FileName.rar DirName
.lha
Decompression: lha -e FileName.lha
Compression: lha -a FileName.lha FileName
Recommendation: Linux self-study Video
The above is what are the commands for decompressing files in Linux? For more details, please pay attention to other related articles on 1024programmer.com!