Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using a find command like

find . -name "*<phrase>*.ext"

This command works fine, when phrase has no spaces. However, if I try something like

find . -name "*A phrase in the file name*.txt"

it will never turn up any results even though I know the file is there.

Is this the intended behavior of find? What can I do to achieve my desired result?

EDIT: Nevermind! It was an issue with my spelling on the specific file, after I RECHECKED it 6 times and didn't notice the difference. I feel pretty stupid about that!

share|improve this question
What OS, file system, and shell are you using? This does have the expected result on my Linux system. – Keith May 15 '11 at 6:21
You've probably heard this but in Unix it's improper to use spaces like that. – Blomkvist May 15 '11 at 6:34
@Blomkvist: Improper why - because lazy-ass programmers use spaces as list separators, or because it was improper in 1980's? The filesystem supports spaces, POSIX allows them, well-written programs deal with them just fine. – grawity May 15 '11 at 12:59
@user: If you found a solution yourself, post it as an 'answer' below and mark as accepted. – grawity May 15 '11 at 13:01
@grawity: You've probably heard this but it's improper to use the term lazy-ass programmers. youtube.com/watch?v=kbxzAgYL98A&feature=related – Blomkvist May 15 '11 at 16:30

closed as too localized by Nifle, random May 15 '11 at 20:35

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

1 Answer

Nevermind! It was an issue with my spelling on the specific file, after I RECHECKED it 6 times and didn't notice the difference. I feel pretty stupid about that!

share|improve this answer

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