Packaging and compression. Packaging refers to a large number of files or directories into a total file, compression is a large file through some compression algorithm into a small file.
This is due to the many compression programs in Linux that can only be compressed for one file, so that when you want to compress a lot of files, you have to first make the whole heap of files into a package (tar command), and then compress with the compression program.
1.tar (for tar packages) reference: http://blog.csdn.net/eroswang/article/details/5555415/
Package that the TAR parameter is packaged in
Parameter:-C Create Package-X unpacking-T view (required, and only one option)
-Z compress into gzip, or unzip gzip (extension, GZ): TAR-CZVF 1.tar.gzip * (Package the contents of the current directory into 1.tar.gzip)
-j compressed into bzip2, or decompression bzip2 (extension, bz2): TAR-CJVF 1.tar.bz2 *
-V Process Visual
-F document name, followed by a direct connection to the document name, cannot be other.
2.gzip (for GZ packages)
3.zip and unzip (for zip packages)
Compress a file or directory into a zip:
Command format: Zip parameter compressed after name compressed file
Common parameters:-r recursive directory, which is a subdirectory of the compressed directory will also be included.
-D Delete a file in a compressed package: zip-d files deleted by the archive
-M adding files to a compressed package: Zip-m Package Add files
Unzip the zip file:
Command format: Unzip parameter extracted file
Common parameters:-D extract to which directory;
Linux compression commands (tar,gzip,zip)