]> Dogcows Code - chaz/tar/commitdiff
(exclude): Document --exclude-tag
authorSergey Poznyakoff <gray@gnu.org.ua>
Thu, 30 Nov 2006 09:41:42 +0000 (09:41 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Thu, 30 Nov 2006 09:41:42 +0000 (09:41 +0000)
doc/tar.texi

index 621ce6063071ae0d83f6d16150e06010269a38b4..cb7502f3f79a44af2b4aa8857d2ad43400817b35 100644 (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
This page took 0.035001 seconds and 4 git commands to generate.