mdfind
From Mac Guides
Revision as of 19:46, 10 June 2008; Eraserhead (Talk | contribs)
(diff) ←Older revision | Current revision | Newer revision→ (diff)
(diff) ←Older revision | Current revision | Newer revision→ (diff)
|
This tip requires |
mdfind is a Terminal command used to performs Spotlight searches. It accepts a search string as input, and returns a list of files (with paths) to each match.
[edit]
Examples
To search for all files containing "MacRumors"
mdfind "MacRumors"
To search for "PowerBook" in your home directory
mdfind -onlyin ~ "PowerBook"
To perform a continuing search for the string "Important information"
mdfind -live "Important Information"
The last example leaves spotlight active, and will update with any new matches as well as a count.
[edit]
Man Page Excerpt
The mdfind command consults the central metadata store and returns a list of files that match the given metadata query. The query can be a string or a query expression.
[edit]

