48

Well the question says it all, I have seen both

find -name 

and

find -iname 

used all over the place without a discernible pattern.

Could somebody explain the differences, perhaps with an example to clarify?

  • 2
    I asked this question when I was very new to Linux and laugh when I see how popular it is. This question is a perfect example of why you need to learn ASAP how to use man find and read the manual. (Or as I would do, google find flags and then use search to find the flag in question) – FreeSoftwareServers May 22 '19 at 00:33
  • 1
    10 upvotes and 3 stars is not that "popular" but I am glad you made that comment so I did not have to. (But I am actually here because its faster so search then to scroll to the manual) – redanimalwar Sep 05 '19 at 06:27
  • 1
    Its nice that the Unix.Linux Community is friendly I feel like this post would get downvoted to Oblivion on stackoverflow. – FreeSoftwareServers Sep 05 '19 at 20:56

1 Answers1

55

From the GNU find manual page:

   -iname pattern
          Like -name, but the match is case insensitive.  For example, the
          patterns `fo*' and `F??' match  the  file  names  `Foo',  `FOO',
          `foo',  `fOo',  etc. 
steeldriver
  • 81,074
  • 3
    Many tools (and most regular expression interpreters) have case-insensitive options. Unix/Linux are not hostile to case, they just acknowledge that there is a difference between upper and lower case. – cas Sep 21 '15 at 02:29
  • 1
    -iname is not part of the standard, but it is supported by various find implementations. So -iname is available in many but not in all cases. – schily Sep 21 '15 at 11:08