Case Insensitive search from find command?

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

Use this:

find . -iname PatTeRn -print
1

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.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like