GNU tar ignoring -X?
Can anyone here help me figure out why gnu tar --exclude and -X are acting funny?
example: I am taring up /var/log. I don't want /var/log/archive/ or /var/log/radacct/. so I try this:
tar -czf mytar.tgz --exclude=/var/log/archive --exclude=/var/log/radacct /var/log
Sounds logical, but tar ignores the --exclude lines (tried just one too to see if that was the problem but no)
I've also tried putting those two directories in a file and
tar -czf mytar.tgz -X excludefile /var/log
but it has the same effect. :-(
Finally I tried this, although I didn't think it'd work at all since the man page says that includes override excludes:
includefile:
/var/log
excludefile:
/var/log/archive
/var/log/radacct
tar -czf mytar.tgz -T includefile -X excludefile
Can anyone help me?
Yes, I've already tried all combinations of removing leading /, adding trailing /, adding /* instead, etc. I don't think that's the problem.
This is GNU tar 1.13. The same thing exists with 1.12 on a much older machine.
|