Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.5: How to refine Spotlight searches in 10.5 System 10.5
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.]
    •    
  • Currently 2.14 / 5
  You rated: 2 / 5 (7 votes cast)
 
[12,894 views]  

10.5: How to refine Spotlight searches in 10.5 | 8 comments | Create New Account
Click here to return to the '10.5: How to refine Spotlight searches in 10.5' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: How to refine Spotlight searches in 10.5
Authored by: Hal Itosis on Oct 24, '08 08:16:37AM
Okay... so I want to find "new Mac" in the contents of some files.
i.e., only those documents with those exact 7 chars in sequence:

$ echo -n 'new Mac' |od -cb
0000000    n   e   w       M   a   c                                    
          156 145 167 040 115 141 143                                    
0000007
How is that done? [using Spotlight... not EasyFind. ;-) ]

-HI-

[ Reply to This | # ]
10.5: How to refine Spotlight searches in 10.5
Authored by: S on Oct 24, '08 08:35:27AM

Double quotes seem to work for me.



[ Reply to This | # ]
10.5: How to refine Spotlight searches in 10.5
Authored by: dreamspy on Oct 25, '08 06:46:30AM

Great hint, but I'm not able to search the metadata like suggested in the hint. F.x. if I do a search like this:

type:.pdf NOT PageWidth:625

the search returns all pdf files, also those width Pagewirth 625.

Anyone?



[ Reply to This | # ]
10.5: How to refine Spotlight searches in 10.5
Authored by: FlyBoy on Oct 25, '08 08:27:20AM

Try this instead:

kind:PDF NOT PageWidth:625

Norm



[ Reply to This | # ]
10.5: How to refine Spotlight searches in 10.5
Authored by: mbrna on Oct 27, '08 08:52:32PM
When I type 'sun NOT set' into my spotlight search bar, it eliminates a particular file from the results because it contains "sun" and "NOT" but not "set".

It is as if the spotlight is searching for files that contain the three sets of characters: sun, NOT, and set.

[ Reply to This | # ]
10.5: How to refine Spotlight searches in 10.5
Authored by: jmcdonnell on Oct 26, '08 10:11:34AM

to find new Mac as a match in Spotlight those characters in that order try quotation marks, example "new Mac" I do this all the time, it works great.



[ Reply to This | # ]
10.5: How to refine Spotlight searches in 10.5
Authored by: Hal Itosis on Oct 26, '08 11:44:05AM

Yes thanks jmcdonnell... that the same as what S reported (directly to my post). After almost 3 years of quotes *not* working in Tiger, I guess I just gave up on trying that method. [Plus, this hint seemed to suggest using the AND keyword]. Anyway, glad Apple finally fixed simple phrase searches for us. Now -- as robg said -- we need the results window's view options fixed. >:-( [sort by size, sort by modified date, etc.]



[ Reply to This | # ]
10.5: How to refine Spotlight searches in 10.5
Authored by: indigo_boy on Oct 27, '08 05:16:59AM

This is a very useful feature indeed, but I still have one difficulty with Spotlight though:

How do I do a search only in selected folders?

Take for example that I have a network drive with 1000 folders and I need to get all .jpg files from only 10 specific folders. Doing a regular search and then selecting just the hits that I need in not an option since the search itself would take forever and selecting the hits afterward would be unpractical.

I need a way to select the folders I want to search in and have Spotlight (or any other program that's capable of doing so) search only in those folders, the same way TotalCommander does on Windows.

Any help would be greatly appreciated.



[ Reply to This | # ]