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.

3 Answers 3


Use this:

find . -iname PatTeRn -print
  • 1. 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, 2020 at 15:07

I believe it's: find . -iname pattern

From man find:

-iname pattern
       Like  -name, but the match is case insensitive.
sudo updatedb

locate -i "nameofthefile"

nameofthefile should be without the inverted commas.

  • It is notable that this is the fastest method for system-wide searches.
    – rm-vanda
    Sep 2, 2014 at 5:00

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.