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.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityUse this:
find . -iname PatTeRn -print
-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.
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.