Extract:
Tar-xvvf/one/a.tar-c/two
Compression:
Tar-zcvf/home/lgh/one.tar.gz/home/lgh/two
TAR-ZCVF the directory to be packaged when the file name full path is generated after packaging
Tar unzip command
Tar
-C: Create compressed archives
-X: Unzip
-T: View content
-r: Append files to the end of a compressed archive file
-U: Update files in original compressed package
These five are stand-alone commands, which use one of the compression decompression, and can be used with other commands but only one. The following parameters are optional when compressing or extracting files as needed.
-Z: With gzip properties
-j: With the bz2 attribute
-Z: With the Compress attribute
-V: Show All procedures
-O: Unpack the file to standard output
The following parameter-F is required
-F: Use the file name, remember that this parameter is the last parameter, can only be followed by the file name.
Reference: http://blog.sina.com.cn/s/blog_62449fcf0100nfar.html
Tar decompression, compression