50

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?

3
  • 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) Commented May 22, 2019 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) Commented Sep 5, 2019 at 6:27
  • 1
    Its nice that the Unix.Linux Community is friendly I feel like this post would get downvoted to Oblivion on stackoverflow. Commented Sep 5, 2019 at 20:56

1 Answer 1

57

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
  • 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
    Commented Sep 21, 2015 at 2: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
    Commented Sep 21, 2015 at 11:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .