Parameters:
-c:create to establish the parameters of compressed files;
-X: Unzip the parameters of the compressed file;
-Z: Do you want to use gzip compression;
-V: The process of compressing the display of files;
-F: Top document name, immediately followed by the file name, can not add parameters
For example: One, all the files in the entire/home/www/images directory are packaged as/home/www/images.tar
[root@xoaocom ~]# tar-cvf/home/www/images.tar/home/www/images← package only, not compressed
[root@xoaocom ~]# tar-zcvf/home/www/images.tar.gz/home/www/images← after packaging, gzip compressed
The compressed filename after the parameter f is taken by itself, used in tar, and, if the z parameter is added, to tar.gz or tgz to represent the gzip-compressed tar file file
Example: Two, unzip the/home/www/images.tar.gz to the/home/www below
[Root@xoaocom ~]# Cd/home/www
[Root@xoaocom ~]# tar-zxvf/home/images.tar.gz
Extract to the specified directory
[root@xoaocom ~]# tar-zxvf/home/images.tar.gz-c/specific dir
Unpack to the specified directory
Tar xvf filename.tar-c/specific dir