用了很久了命令真不应该 ,还没搞懂exclude与-X(区别),学东西还是浮在表面,拍自己下.


-X, --exclude-from=FILE===>排除的文件写在一个文件当中
       exclude patterns listed in FILE
       File name matching options (affect both exclude and include pattern)

测试下:

1.建立exclude file 

image

2.开始打包:

image

3.查看:

image

第二步时就感觉不对劲了,没起作用.又去找了man ,没搞懂;网上搜到这片文章:

http://bbs.chinaunix.net/thread-1497201-1-1.html

再次测试:

image

小结: 按照参考

1.exclude file必须要写绝对路径,养成习惯

2.后面要备份的文件必须写绝对路径

image

--exclude=PATTERN===>直接接排除的文件
       exclude files, given as a PATTERN


image

总结: 1.学习不能有一点马虎,看过的东西自己要亲自去测试

2.多注意一些小的细节,平时多积累

3.遇到错误多多总结.