Go to the previous, next section.

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.

Go to the previous, next section.