(10.3) tar --exclude

Patrick Lamaiziere patfbsd at davenulle.org
Mon Oct 24 12:07:46 UTC 2016


Hello,

Something that coold be trivial but I don't understant with tar.

# tar --exclude './tmp' -C / -cf /tmp/test.tar etc && tar -tf /tmp/test.tar | grep tmp
etc/periodic/daily/110.clean-tmps
etc/rc.d/cleartmp

Why tar doesn't archive the file ./etc.rc.d/tmp ?

When using the same exclude pattern on '/' (ie : tar --exclude './tmp' -C / -cf file .),
it doesn't archive /tmp (good), but also /etc/rc.d/tmp and /var/tmp/ and I don't understand why.

Thanks, regards.



More information about the freebsd-questions mailing list