File backup and compression command

tar 
z: by gzip compress or decompress 
c: Creates a new tar archive 
v: Show must perform the procedure 
f: Specifies the name of the result file compression 
t: do not extract the tar package to view the contents of 
p: keep the original file attributes 
x: Extract open tar package 
--exclude = packaged file path, file or directory skipped 
-X process does not need to read the file name from the specified file or directory file set inside 
-h: a real file package soft connection file points

  

 

 

 

 

If not specified type is not gzip z option, the tar command will automatically determine which packets are compressed and then select the appropriate decompression

 

 

 

 

 Note: back path can not exclude contact / end

 

 Note: Does not include compressed file and directory location

If you need to pack a relative directory path, --exclude behind only Jason relative path

If desired directory packaged absolute path --exclude take back the absolute path can be a relative path

For convenience, packaged --exclude path and back to the path should be consistent

Guess you like

Origin www.cnblogs.com/betterquan/p/11756506.html