开发者

Destination directory while compressing using tar

I have a directory say "DIR" which contains so many directories say "A", "B" and "C"

I want to tar DIR without including "C" in it so that DIR.tar开发者_如何学C.gz does not contain the directory "C".

What is the shell command for this?

Thanks, LinuxPenseur


Depending on your command line, something like this:

tar -cf archive.tar --exclude C DIR

Also, to nitpick your question, tar does not perform compression.


Try this

tar --exclude="C" -czvf D.tar.gz DIR
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜