[X-Unix] Spotlight -- was from tcsh to bash

Andy Swanson swansoac at uwec.edu
Mon May 23 05:44:43 PDT 2005


On May 21, 2005, at 5:00 PM, William H. Magill wrote:

>
> On 20 May, 2005, at 02:48, Dan Frakes wrote:
>
>>> An implicit boolean AND when parentheses are used, or a command key
>>> to initiate search-for-phrase, maybe command-Shift for exact words,
>>> etc.
>>>
>>>
>>
>> *This* is in my opinion the biggest problem with Spotlight right  
>> now -- no
>> easy way to do booleans. The code you need to use in the Spotlight  
>> bar to do
>> a boolean search is insane ;-)s
>>
>
> I thought I had read that Spotlight defaults to "or" for all search  
> tokens
> and that one needed to use "AND" (in caps) to get the and function,  
> with
> Parens ()  or quotes "" for groupings.
>
> But I can't find that reference now.

There's a nice discussion Boolean searches in Spotlight going on at:
<http://www.macosxhints.com/article.php?story=20050503165951266>.

Brief summary: to use booleans searching for CONTENT ONLY, use "|"  
for "or" and "-" for not. Spaces mean "and" so be careful with them.

For example, create four test files each containing one of the  
following lines:
spotlight test file numbers one
spotlight test file number two
spotlight test file no three
spotlight file test no. four

Type the following into your spotlight search field:
spotlight test no|numb*

Spotlight finds all four files and a few others.

Instead type
spotlight test no|numb*-four

Spotlight finds only the first three files.

Unfortunately, this works only for content, not for other metadata.

    Andy


More information about the X-Unix mailing list