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,619

3 Answers3

126

Use this:

find . -iname PatTeRn -print
soandos
  • 24,600
  • 29
  • 105
  • 136
44

I believe it's: find . -iname pattern

From man find:

-iname pattern
       Like  -name, but the match is case insensitive.
Wuffers
  • 19,619
karlphillip
  • 1,051
10
sudo updatedb

locate -i "nameofthefile"

nameofthefile should be without the inverted commas.

Indrek
  • 24,874
Ransell
  • 101
  • 1
  • 2