(tar)Excluding Some Files


Next: Operating Only on New Files Prev: Reading Names from a File Up: Characteristics

Excluding Some Files
--------------------

     *(This message will disappear, once this node revised.)*

   The `--exclude=PATTERN' option will prevent any file or member which
matches the regular expression PATTERN from being operated on.  For
example, if you want to create an archive with all the contents of
`/tmp' except the file `/tmp/foo', you can use the command `tar
--create --file=arch.tar --exclude=foo'.

   If there are many files you want to exclude, you can use the
`--exclude-from=FILE-OF-PATTERNS' (`-X FILE-OF-PATTERNS') option.  This
works just like the `--files-from=FILE-OF-NAMES' (`-T FILE-OF-NAMES')
option: specify the name of a file as EXCLUDE-LIST which contains the
list of patterns you want to exclude.

FIXME: xref Regular Expressions
   for more information on the syntax and meaning of regular
expressions.


automatically generated by info2www version 1.2