100

I am not able to figure out how can I do case-insensitive search using the find command.

I tried

find . -name -i pattern

And it does not work.

Wuffers
  • 19,241

3 Answers3

126

Use this:

find . -iname PatTeRn -print
soandos
  • 24,404
  • 28
  • 103
  • 134
  • Providing the -print flag is redundant because if omitted, this is actually the default behavior. 2. TIL that the double quotes around the search term are optional.
  • – rodey Mar 30 '20 at 15:07