I thought the wildcard * in the command find . -name *foo* is replaced by bash, and yet the command works unless *foo* matches something in the current directory, then it doesn't. It's confusing.
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
If bash can't find a match, it passes the literal string to the application with
|
|||||
|
|
If you want
|
|||
|
|
find . -name *foo*withfind . -name '*foo*'it will allow the wildcard matches to work as expected. – Bill Jul 29 '11 at 22:01