10

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?

  • 1
    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 at 0: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 5 at 6:27
  • Its nice that the Unix.Linux Community is friendly I feel like this post would get downvoted to Oblivion on stackoverflow. – FreeSoftwareServers Sep 5 at 20:56
21

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. 
  • 2
    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 2:29
  • -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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.