use*_*183 17 unix linux bash gzip tar
我有一个包含许多子目录的目录.在某些子目录中,我有*.asc扩展名的文件和一些*.xdr.
*.asc
*.xdr
我想创建一个SINGLE tarball/gzip文件来维护目录结构但排除所有带*.xdr扩展名的文件.
我怎样才能做到这一点?
我做了类似的事情,find . -depth -name *.asc -exec gzip -r9 {} +但这个gzips每个*.asc文件单独,这不是我想要做的.
find . -depth -name *.asc -exec gzip -r9 {} +
All*_*lex 36
你需要使用--exclude选项:
--exclude
tar -zc -f test.tar.gz --exclude='*.xdr' *
归档时间:
12 年,3 月 前
查看次数:
22378 次
最近记录:
6 年,7 月 前