liunx_ compression, packing 006

Packaging: I multiple files into one file

Compression: lifting speed during transmission

Creating a plurality of files: touch {a..z} .txt create multiple txt file from a to z.

Package command

tar cvf demo.tar * // all files in the current directory to package

tar -tf demo.tar // see all the contents of the current package

tar xvf demo.tar * // all files in the current directory to decompress

ls -lh demo.tar // File Size View

-rw-r--r-- 1 root root 20K May 29 13:35 demo.tar

 

compression

gzip demo.tar   

-rw-r--r-- 1 root root 321 May 29 13:35 demo.tar.gz

ls -lh demo.tar // File Size View

gunzip demo.tar.gz // decompression

tar cvzf demo.tar.gz * // add compression and file compression

tar xvf demo.tar // all the files in the current directory to decompress

 

Guess you like

Origin www.cnblogs.com/njq666/p/10943569.html