Tar is commonly used on Linux packaging, compression, compression tools, he has a lot of parameters, folding only to enumerate the commonly used compression and decompression parameters
Parameters:
-c:create set up the parameters of compressed archives;
-X: Extracting parameters of compressed archives;
-Z: Whether to use gzip compression;
-V: Files are displayed during compression;
-F: The top document name, immediately after F to answer the file name, can not add parameters
Example: First, the entire/home/www/images directory of files are packaged as/home/www/images.tar
[[email protected] ~]# tar-cvf/home/www/images.tar/home/www/images← package only, do not compress
[[email protected] ~]# tar-zcvf/home/www/images.tar.gz/home/www/images← after packing, compress with gzip
The compressed file name after the parameter F is self-fetching, used in tar to do, if the z parameter, then tar.gz or tgz to represent the gzip compressed tar file file
Example: Two, extract/home/www/images.tar.gz to/home/www below
[Email protected] ~]# cd/home/www
[Email protected] ~]# tar-zxvf/home/images.tar.gz
Unzip to the specified directory
[Email protected] ~]# tar-zxvf/home/images.tar.gz-c/specific dir
Unpacking to the specified directory
Tar xvf filename.tar-c/specific dir
How to package, compress, and unzip the tar to a specified directory