Big Data - Compression decompression operation

Compression decompression operation

1.gzip compression

gzip a.txt

 

2. Extract

gunzip a.txt.gz

gzip -d a.txt.gz

 

3.bzip2 compression

bzip2 a.txt

 

4. decompression

bunzip2 a.txt.bz2

bzip2 -d a.txt.bz2

 

5. The package files in the current directory

takes -cvf bak.tar.

The / etc / password file is added to the bak.tar (r)

tar -rvf bak.tar / etc / password

 

6. decompression

tar -xvf bak.tar

 

7. packaged and compressed gzip

takes -zcvf a.tar.gz.

 

8. decompressor

tar -zxvf a.tar.gz

Extract to the / usr /

tar -zxvf a.tar.gz -C /usr

 

9. View archive content

tar -ztvf a.tar.gz

zip/unzip

 

10. The packaged and compressed into bz2

tar -jcvf a.tar.bz2

 

11. decompression bz2

tar -jxvf a.tar.bz2

Guess you like

Origin www.cnblogs.com/qq18361642/p/11856562.html