From cc82db7f2d7768afab6d789c0e78ce1f07722d0d Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Thu, 30 Nov 2006 09:41:42 +0000 Subject: [PATCH] (exclude): Document --exclude-tag --- doc/tar.texi | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/doc/tar.texi b/doc/tar.texi index 621ce60..cb7502f 100644 --- a/doc/tar.texi +++ b/doc/tar.texi @@ -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 -- 2.44.0