Reputation: 6655
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.gz does not contain the directory "C".
What is the shell command for this?
Thanks, LinuxPenseur
Upvotes: 0
Views: 962
Reputation: 168958
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.
Upvotes: 2