Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Apr 29 '11 at 22:58

This question came from our site for professional and enthusiast programmers.

3 Answers 3

Use this:

find . -iname PatTeRn -print
share|improve this answer

I believe it's: find . -iname pattern

From man find:

-iname pattern
       Like  -name, but the match is case insensitive.
share|improve this answer
sudo updatedb

locate -i "nameofthefile"

nameofthefile should be without the inverted commas.

share|improve this answer
    
It is notable that this is the fastest method for system-wide searches. –  rm-vanda Sep 2 at 5:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.