Zip compression tool
Support compression directory, do not delete the original file after compression
Preparatory work:
Install the ZIP package and unzip package with the Yum-y install zip unzip and copy the large files to the Aminglinux directory
Zip 1.txt.zip 1. txt: Compressed files
Zip-r aming.zip 1.txt aminglinux/: Files and directories are compressed together
Unzip Aming.zip: Extract uppercase a parameter to all Yes
Unzip 1.txt.zip-d test/: Extract the time specified to extract to the specified directory (file name cannot be changed, what name before compression, what is the name after compression)
Unzip-l aming.zip: See what files are in the compressed package
Tar packaging
Just a packaging tool, not responsible for compression (but because 1 blocks are 4KB, and packaging will do some small compression, so after packaging may be a little change in size)
TAR-CVF Aminglinux.tar aminglinux/: Package A directory: C parameters for the creation, v parameters for the process visualization, F followed by the TAR package name and things to be packaged, C and F are necessary, cannot be omitted
TAR-CVF Aminglinux.tar aminglinux/1.txt 2.txt: Pack The directories and files together
TAR-TF Aminglinux.tar: See what files are in the package
TAR-CVF Aminglinux.tar--exclude aming1--exclude 2.txt aminglinux/1.txt 2.txt: Set to filter the Aming1 directory and 2.txt files when packaging, you can also set *.txt, Filter all txt suffix files
TAR-XVF Aminglinux.tar: Unpacking
Package and Compress
TAR-ZCVF aminglinux.tar.gz aminglinux/1.txt 3.txt:tar can be compressed while packaging, here is gzip, add Z, unpack and unzip can change C to X
TAR-JCVF aminglinux.tar.gz aminglinux/1.txt 3. txt: Compress with bzip2 when packing, add J, unpack and unzip to change C to X
TAR-JCVF aminglinux.tar.xz aminglinux/1.txt 3. txt: Compress with XZ when packing, add J, unpack and unzip to change C to X
TAR-TF AMINGLINUX.TAR.BZ2:TF parameter, even if it is packed, you can view the files in the package
Linux Notes -020-zip compression tool, tar Pack and pack and compress