find: Base Name Patterns

1 
1 2.1.1 Base Name Patterns
1 ------------------------
1 
1  -- Test: -name pattern
1  -- Test: -iname pattern
1      True if the base of the file name (the path with the leading
1      directories removed) matches shell pattern PATTERN.  For '-iname',
1      the match is case-insensitive.(1)  To ignore a whole directory
1      tree, use '-prune' (⇒Directories).  As an example, to find
1      Texinfo source files in '/usr/local/doc':
1 
1           find /usr/local/doc -name '*.texi'
1 
1      Notice that the wildcard must be enclosed in quotes in order to
1      protect it from expansion by the shell.
1 
1      As of findutils version 4.2.2, patterns for '-name' and '-iname'
1      will match a file name with a leading '.'.  For example the command
1      'find /tmp -name \*bar' will match the file '/tmp/.foobar'.  Braces
1      within the pattern ('{}') are not considered to be special (that
1      is, 'find . -name 'foo{1,2}'' matches a file named 'foo{1,2}', not
1      the files 'foo1' and 'foo2'.
1 
1      Because the leading directories are removed, the file names
1      considered for a match with '-name' will never include a slash, so
1      '-name a/b' will never match anything (you probably need to use
1      '-path' instead).
1 
1    ---------- Footnotes ----------
1 
1    (1) Because we need to perform case-insensitive matching, the GNU
1 fnmatch implementation is always used; if the C library includes the GNU
1 implementation, we use that and otherwise we use the one from gnulib
1