Chinaunix

标题: tar 是否可以将源目录里想备份的剔除 [打印本页]

作者: fox2    时间: 2009-05-19 22:53
标题: tar 是否可以将源目录里想备份的剔除
由于要tar的目录tar出来的文件大于8G,所以tar总是无法完成,于是我想tar 是否可以将源目录里不想备份的子目录剔除呢? 我用的是aix 5.2 ,请多多指教。
作者: yddll    时间: 2009-05-19 23:40
man tar\r\n\r\n\r\n -X ExcludeList\r\n            Excludes the file names or directories given in the ExcludeList\r\n            from the tar archive being created, extracted or listed. The\r\n            ExcludeList shall contain only one filename or directory per line\r\n            which are to be excluded from the tar archive being created,\r\n            extracted from or listed. The -X option can be specified multiple\r\n            times and it takes precedence over all other options.
作者: sweetl    时间: 2009-05-20 10:47
-X ExcludeList\r\n            
作者: fox2    时间: 2009-05-22 10:34
我也man了,但是怎么写没搞明白,例如  想tar /home ,但不想要/home/tmp ,是怎么写呢?\r\n\r\ntar -cvf  home.tar  home  -X ExcludeList  /home/tmp  ?
作者: wangcy73    时间: 2009-10-30 17:47
提示: 作者被禁止或删除 内容自动屏蔽




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2