Linux_ packed files

 The package multiple files into one big file, use the tar command

tar is connecting together a plurality of files back and forth, not tar file compression

Tar -cf package file name to be created (the last with .tar) files to be packaged / c list of representatives to create a package file, f specify the package file name

tar -cf sam.tar file01 file02 file03 (1,2,3 file at this time should be in the current directory)

tar can also be packaged directory: tar -cf sam.tar / tmp / sam01 sam01 package directories under tmp directory

 

tar -tf packed files   

Show all file names package file

 

Delete specific files packed file with the --delete

tar -f ./sam.tar --delete file03

File03 delete files sam.tar packaged file

 

Tar file merge two -A

tar -f ./sam01.tar -A ./sam.tar sam01 incorporated in the sam.tar

 

-R file with a new addition to the packaged file

tar -f ./sam.tar -r ~/file.txt  

The merge file file to the user's home directory sam this package file

 

Unpack

takes 

 

Guess you like

Origin www.cnblogs.com/vocoub/p/11707347.html