Home  >  Article  >  Operation and Maintenance  >  What are the commonly used file decompression commands in Linux?

What are the commonly used file decompression commands in Linux?

王林
王林forward
2023-05-12 18:31:1711387browse

1. .tar

Unpacking: tar xvf fileName.tar

Packing: tar cvf FileName.tar DirName

Note: tar is packaging, not compression

2. .gz

Decompression 1: gunzip FileName.gz

Decompression 2: gzip -d FileName.gz

Compression: gzip FileName

3. .tar.gz and .tgz

Decompression: tar zxvf FileName.tar.gz

Compression: tar zcvf FileName.tar.gz DirName

4 , .gz2

Decompression 1: bzip2 -d FileName.bz2

Decompression 2: bunzip2 FileName.bz2

Compression: bzip2 -z FileName

5 , .tar.bz2

Decompression: tar jxvf FileName.tar.bz2

Compression: tar jcvf FileName.tar.bz2 DirName

6. .bz

Decompression 1: bzip2 -d FileName.bz

Decompression 2: bunzip2 FileName.bz

Compression: Unknown

7. .tar.bz

Decompression: tar jxvf FileName.tar.bz

Compression: unknown

8. .zip

Decompression: unzip FileName.zip

Compression: zip FileName.zip DirName

9. .rar

Decompression: rar x FileName.rar

Compression: rar a FileName.rar DirName

The above is the detailed content of What are the commonly used file decompression commands in Linux?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete