10.5: How to refine Spotlight searches in 10.5

Oct 24, '08 07:30:00AM

Contributed by: Anonymous

I found some prior hints on the site about using boolean searches in 10.4; there are now easier ways of doing this, and a more powerful way of refining what you search for, in Leopard. In Spotlight, or just the find bar in a Finder window, you can type sun NOT set (the capitalization of NOT is important) to instantly show all matches, except those containing 'sunset.' The same can be done with OR and AND modifiers.

To extend this and do super specific searches, you can use file attributes. For example, I want to exclude movie frames from an image search, so I would type .tga NOT PixelWidth:720. There are many attributes you can use -- to find these for a specific file, use Terminal and type mdls, press the Space Bar, and then type the path to that file's location (or just drag it in from the Finder). Terminal will return a list of operators; you can use any of these in your queries, but remove the kMDItem prefix that shows in Terminal.

[robg adds: The ability to do boolean searches with Spotlight in 10.5 -- as well as the ability to search for phrases -- has greatly improved the usability of the tool in Leopard. Now if only we could add more columns to the search results, as we could in 10.4, 'find by size' would actually be useful again.]

Comments (8)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20081023110322940