tar 分卷压缩以及排除某目录文件实例
- Posted at Febuary 3rd, 2010 16:37
- Filed under 资讯火药库/LINUX/UNIX
测试环境目录结构:
/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
- Response
- No Trackback , No Comment
Trackback URL : 无法向此文章发送引用
