List of tar parameters:
-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.
The common command parameters are-c,-x,-z,-j,-v,-f.
Common usage:
1, packaging
TAR-CVF all.tar xxx pack xxx into All.tar
TAR-CZVF all.tar.gz XXX package xxx into tar, and compress into. gz format
TAR-CJVF all.tar.bz2 XXX package xxx into tar, and compress into. bz2 format
TAR-XVF All.tar unzip. Tar Package
TAR-XZVF all.tar.gz extract. tar.gz bag
TAR-XJVF all.tar.bz2 extract. tar.bz2 bag
Common usage of TAR commands under Linux