Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How can I find a file whose name includes a given string, such as “abcde”?

How to find files in terminal that contains the string "foo"?

I tried the following but doesn't work.

find *foo*.*  // any character before or after "foo" of any extension.

I tried googling UNIX or bash wild card but doesn't provide me any useful result.

share|improve this question

marked as duplicate by Mat, manatwork, warl0ck, rahmu, Renan Sep 19 '12 at 11:37

This question was marked as an exact duplicate of an existing question.

Are you looking for files with foo in their name, or files that contain the string foo somewhere in their contents? BTW, there are hundreds of resources on the use of find here and on the Internet. I'm pretty sure you can find your question answered (whether it's file name or file contents) if you search a bit more. – Mat Sep 19 '12 at 9:00
files with "Foo" in the file name. – KMC Sep 19 '12 at 9:02
I think you could have found this without any effort. find . -name '*foo*' – ire_and_curses Sep 19 '12 at 9:09
Use a combination of find and grep as mentioned here wilddiary.com/find-files-containing-my-text – Drona Oct 8 '15 at 13:46

Comment from @ire_and_curses would be almost correct, but it will not find any files like Foo,fOo, ... This would be better in your case:

from find man page:
-iname pattern
     Like -name, but the match is case insensitive.

find <path> -iname '*foo*'
share|improve this answer

sorry I didn't understand the question. You should try

find . -name '*foo*'

as specified above

share|improve this answer

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