on 2011-02-26 at 09:33 Grant wrote:

>I can't get find to work.  This works:
>
>locate *foo*.txt
>
>but none of these work:
>
>find /my/folder -name foo*.txt
>find /my/folder -name *foo*.txt
>find /my/folder -type f -name '*foo*.txt'
>
>What am I doing wrong?  I do need the find to be recursive in that folder.


i'm sorry i haven't been following the thread too closely, but the last
one should work. according to man find, when using wildcards in a search,
"you should enclose the pattern in quotes or escape the wildcard", meaning
that all these work:

find /my/folder -type f -name "*foo*.txt"
find /my/folder -type f -name '*foo*.txt'
find /my/folder -type f -name \*foo\*.txt

they certainly work for me. am i missing something?

Reply via email to