Controlling Pattern-Matching with the exclude Options
Normally, a pattern matches a name if an initial subsequence of the
name's components matches the pattern, where ‘*’, ‘?’, and
‘[...]’ are the usual shell wildcards, ‘\’ escapes wildcards,
and wildcards can match ‘/’.
Other than optionally stripping leading ‘/’ from names
(see absolute), patterns and names are used as-is. For
example, trailing ‘/’ is not trimmed from a user-specified name
before deciding whether to exclude it.
However, this matching procedure can be altered by the options listed
below. These options accumulate. For example:
ignores case when excluding ‘makefile’, but not when excluding
If anchored, a pattern must match an initial subsequence
of the name's components. Otherwise, the pattern can match any
subsequence. Default is --no-anchored.
When ignoring case, upper-case patterns match lower-case names and vice versa.
When not ignoring case (the default), matching is case-sensitive.
When using wildcards (the default), ‘*’, ‘?’, and ‘[...]’
are the usual shell wildcards, and ‘\’ escapes wildcards.
Otherwise, none of these characters are special, and patterns must match
When wildcards match slash (the default), a wildcard like ‘*’ in
the pattern can match a ‘/’ in the name. Otherwise, ‘/’ is
matched only by ‘/’.
The --recursion and --no-recursion options
(see recurse) also affect how exclude patterns are interpreted. If
recursion is in effect, a pattern excludes a name if it matches any of
the name's parent directories.
Published under the terms of the GNU General Public License