tar分卷压缩

以每卷500M为例
tar分卷压缩:tar cvzpf – somedir | split -b 500m
tar多卷合并:cat x* > somedir.tar.gz
tar解压缩:tar xvfz somedir.tar.g

tar:
-c: create a new archive
-v: verbosely list files processed
-z: filter the archive through gzip
-p: extract all protection information, 释放包时使用-p参数来保留原来的权限
tar在创建包的时候有包含文件原先的权限,但是释放包的时候默认是使用新建文件的权限,而不是文件原先的权限,除非带上-p参数
-f: 定义操作所使用的tar档案文件
-x: extract files from an archive

This entry was posted in Ubuntu. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *