测试环境目录结构:
/root/test/
/root/test/567/
/root/test/hello.txt
/root/test/123/
/root/test/456/
/root/test/456/wooooo.txt
/root/test/456/adfasdf.txt

现排除/root/test/456/目录下文件不进行压缩:
1. tar czvf test.tar.gz  /root/test/ --exclude /root/test/456/*
2.创建list文件,将/root/test/456写入该文件,如果还有其他目录一行条
tar czvf test.tar.gz  /root/test/ --exclude-from list

分卷压缩:
tar cvf test.tar.gz  /root/test/  --multi-volume --tape-length=10240 --file=1.tar --file=2.tar --file=3.tar
不能加z参数,分卷压缩不支持gzip.--file=的个数根据需要备份的容量来决定,比如需要打包的有450MB,每个包为100MB的话,就要有5个--file

Posted by microsea


Trackback URL : 无法向此文章发送引用

« Previous : 1 : 2 : 3 : 4 : 5 : 6 : ... 351 : Next »

BlogImage

Microsea,Fiona & Owen's family BLOG

- microsea

Statistics Graph

Calendar

«   Mar 2010   »
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

闽ICP备06003076号