According to the GNU tar manual page, directories containing a CACHEDIR.TAG
file can be excluded by specifying a command-line option, such as --exclude-cache
.
This doesn't seem to happen.
$ mkdir -p t/a/b/c $ touch t/a/b/foo t/a/b/CACHEDIR.TAG $ tar --exclude-caches-all -cvf /dev/null t t/ t/a/ t/a/b/ t/a/b/c/ t/a/b/CACHEDIR.TAG t/a/b/foo