Next: , Up: Name



2.1.1 Base Name Patterns

— Test: -name pattern
— Test: -iname pattern

True if the base of the file name (the path with the leading directories removed) matches shell pattern pattern. For -iname, the match is case-insensitive. To ignore a whole directory tree, use -prune (see Directories). As an example, to find Texinfo source files in /usr/local/doc:

          find /usr/local/doc -name '*.texi'
     

Patterns for -name and -iname will match a filename with a leading .. For example the command find /tmp -name \*bar will match the file /tmp/.foobar.