Summary of various compression and decompression methods under Ubuntu
- 2020-05-30 21:59:49
- OfStack
This paper mainly introduces various compression and decompression methods under Ubuntu. The importance of compression and decompression is not stated here, but let's directly look at the detailed introduction.
1. .tar
Unpack the:
tar xvf FileName.tar
Packaging:
tar cvf FileName.tar DirName
(note: tar is packaged, not compressed!)
2. .gz
Unpack the 1:
gunzip FileName.gz
Unpack the 2:
gzip -d FileName.gz
Compression:
gzip FileName
.tar.gz
Extract:
tar zxvf FileName.tar.gz
Compression:
tar zcvf FileName.tar.gz DirName
3. .bz2
Unpack the 1:
bzip2 -d FileName.bz2
Unpack the 2:
bunzip2 FileName.bz2
Compression:
bzip2 -z FileName
.tar.bz2
Extract:
tar cvf FileName.tar DirName
0
Compression:
tar jcvf FileName.tar.bz2 DirName
3. .bz
Unpack the 1:
bzip2 -d FileName.bz
Unpack the 2:
bunzip2 FileName.bz
.tar.bz
Extract:
tar jxvf FileName.tar.bz
4. .Z
Extract:
uncompress FileName.Z
Compression:
compress FileName
.tar.Z
Extract:
tar Zxvf FileName.tar.Z
Compression:
tar Zcvf FileName.tar.Z DirName
5. .tgz
Extract:
tar zxvf FileName.tgz
.tar.tgz
Extract:
tar zxvf FileName.tar.tgz
Compression:
tar zcvf FileName.tar.tgz FileName
6. .zip
Extract:
unzip FileName.zip
Compression:
zip FileName.zip DirName
7. .rar
Extract:
rar a FileName.rar
Compression:
rar e FileName.rar
8. .lha
Extract:
lha -e FileName.lha
Compression:
lha -a FileName.lha FileName
conclusion