请教linux一个压缩的问题
时间:2011-08-26
来源:互联网
tar -zcvf /tmp/etc.tar.gz /etc
是个压缩文件的用法,但是,我现在遇到一个问题,如果我在/etc目录下有个文件夹uploadfiles 占用了很大的空间,我想压缩/etc的时候,把uploadfiles文件夹排除在外,请问,怎么写这个命令哦?
是个压缩文件的用法,但是,我现在遇到一个问题,如果我在/etc目录下有个文件夹uploadfiles 占用了很大的空间,我想压缩/etc的时候,把uploadfiles文件夹排除在外,请问,怎么写这个命令哦?
作者: liujun3512159 发布时间: 2011-08-26
楼主,用-X选项试试
-X, --exclude-from=FILE exclude patterns listed in FILE
--anchored exclude patterns match file name start (default)
--no-anchored exclude patterns match after any /
--ignore-case exclusion ignores case
--no-ignore-case exclusion is case sensitive (default)
--wildcards exclude patterns use wildcards (default)
--no-wildcards exclude patterns are plain strings
--wildcards-match-slash exclude pattern wildcards match '/' (default)
--no-wildcards-match-slash exclude pattern wildcards do not match '/'
-X, --exclude-from=FILE exclude patterns listed in FILE
--anchored exclude patterns match file name start (default)
--no-anchored exclude patterns match after any /
--ignore-case exclusion ignores case
--no-ignore-case exclusion is case sensitive (default)
--wildcards exclude patterns use wildcards (default)
--no-wildcards exclude patterns are plain strings
--wildcards-match-slash exclude pattern wildcards match '/' (default)
--no-wildcards-match-slash exclude pattern wildcards do not match '/'
作者: louyong0571 发布时间: 2011-08-26
能写出来吗?给我参考下,呵呵
作者: liujun3512159 发布时间: 2011-08-26
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28