Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

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:

     --ignore-case --exclude='makefile' --no-ignore-case ---exclude='readme'

ignores case when excluding ‘makefile’, but not when excluding ‘readme’.

--anchored
--no-anchored
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.


--ignore-case
--no-ignore-case
When ignoring case, upper-case patterns match lower-case names and vice versa. When not ignoring case (the default), matching is case-sensitive.


--wildcards
--no-wildcards
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 names literally.


--wildcards-match-slash
--no-wildcards-match-slash
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 Design by Interspire