(exclude): Document --exclude-tag

This commit is contained in:
Sergey Poznyakoff
2006-11-30 09:41:42 +00:00
parent 137ebf41fd
commit cc82db7f2d

View File

@@ -2505,6 +2505,11 @@ patterns in the file @var{file}. @xref{exclude}.
Automatically excludes all directories
containing a cache directory tag. @xref{exclude}.
@opsummary{exclude-tag}
@item --exclude-tag=@var{file}
Exclude all directories, containing file named @var{file}. @xref{exclude}.
@opsummary{file}
@item --file=@var{archive}
@itemx -f @var{archive}
@@ -6481,6 +6486,43 @@ Various applications write cache directory tags into directories they
use to hold regenerable, non-precious data, so that such data can be
more easily excluded from backups.
@findex exclude-tag
Another option, @option{--exclude-tag}, provides a generalization of
this concept. It takes a single argument, a file name to look for.
Any directory that contains this file will be excluded from the dump.
@table @option
@opindex exclude-tag
@item --exclude-tag=@var{file}
Causes @command{tar} to ignore directories containing @var{file}.
@end table
You can specify as many exclusion tags as you like.
Notice, that when speaking about ``excluding the directory'' we mean
that the files and subdirectories it contains will not get into the
archive, while the entry for the directory itself will, e.g.:
@smallexample
$ @kbd{find dir}
dir
dir/blues
dir/jazz
dir/folk
dir/folk/tagfile
$ @kbd{tar -cf archive.tar --extract-tag=tagfile -v}
dir/
dir/blues
dir/jazz
dir/folk/
./tar: dir/folk/: contains a cache directory tag tagfile; not dumped
$ @kbd{tar -tf archive.tar}
dir/
dir/blues
dir/jazz
dir/folk/
@end smallexample
@menu
* problems with exclude::
@end menu