Compression solution under Linux

Linux under common archive formats are five kinds: zip tar.gz tar.bz2 tar.xz tar.Z

Wherein the tar is a kind of packaging formats, gz and bz2 is a suffix to refer to compression: gzip and bzip2

 

filename .zip decompression:

unzip filename.zip

 

filename .tar.gz decompression:

tar -zxvf filename.tar.gz

Wherein the meanings are as follows zxvf

Z: G Z IP compression format

X: E X tract decompression

v:    v erbose Details

f:   f Ile (File = archieve) file

 

filename .tar.bz2 decompression:

tar -jxvf filename.tar.bz2

j: bzip2 compression format

Other options tar.gz and extract the same meaning

 

filename .tar.xz decompression: 

tar -Jxvf filename.tar.xz

Note J capital

 

filename .tar.Z decompression: 

tar -Zxvf filename.tar.Z

Note Z capital

 

Details about the tar command can

tar --help

 

In fact, since version 1.15 from tar can automatically identify a compressed format, so no need to distinguish between people can correctly decompress compressed format

tar -xvf filename.tar.gz
tar -xvf filename.tar.bz2
tar -xvf filename.tar.xz
tar -xvf filename.tar.Z

Guess you like

Origin www.cnblogs.com/soymilk2019/p/11566826.html