mdfind

Quick question about mdfind. From what I've read (and I am most likely not understanding this correctly), you can use the mdfind command to search for files containing multiple words invoking it as:
mdfind "test|apple"

which would result in giving me the file paths of all files containing the words "test" and/or "apple". So far this just ends without displaying any results. So I guess I need to know how to run the command correctly.

Thanks!

PowerMac G5, Mac OS X (10.5.7)

Posted on Jan 14, 2010 12:00 PM

Reply
2 replies

Jan 14, 2010 4:20 PM in response to tmcmurtr

You can always refer to the mdfind manual page for specifics, but you will need to build the query using the appropriate quoting and boolean expressions (for example, || is or, && is and).

Apple's Spotlight's Query Expression Syntax documentation also has more information about building a Spotlight query.

By the way, to format your code snippets, place them between two {code} tags.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

mdfind

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.