Improve Spotlight Searches with Search Operators in Mac OS X

Jan 6, 2010 - 9 Comments

Spotlight search operators If you know some specific attributes of a file, application, or item you are looking for on a Mac, you can use Spotlight Search Operators to dramatically narrow down your returned results in the OS X search feature. For example, if the file type of a document you are looking for is a PDF, you can pre-qualify search results by using operators to return only PDF’s within Spotlight. There are tons of search operators to use, and some can get very specific. Let’s jump into this a bit to learn more.

Remember, to access Spotlight search on a Mac, hit the Command+Spacebar keys together. Then just type in the little popup search box to start narrowing down the queries and returned items. Spotlight adjusts files live and on the fly depending on what is looked for and specified, thus if you want to try an operator it will immediately adjust the search to accommodate the search operator request.

Here are a some sample operators to enter before your search query that you can try yourself in Spotlight for Mac OS X:

Spotlight Search Operators

Note that all of these search operators are used in Spotlight in the following syntax format “operator:specific” always separated by a semi-colon. If you’re having troubles with results coming back, check your syntax to make sure you have typed things correctly.

kind:application
kind:applications
kind:app
kind:contact
kind:contacts
kind:folder
kind:folders
kind:image
kind:images
kind:movie
kind:movies
kind:music
kind:audio
kind:jpeg
kind:pict
kind:text
kind:rtf
kind:osxdaily
kind:pdf
kind:pdfs
kind:system preferences
kind:preferences
kind:bookmark
kind:bookmarks
kind:font
kind:fonts
kind:presentations
kind:presentation
kind:email
kind:emails
kind:mail message
kind:mail messages
kind:event
kind:events
kind:reminder
kind:reminders

The usage of this is demonstrated in the attached screenshot, where I pre-qualified my search for ‘asia’ with the PDF filetype operator, which led Spotlight to only search PDF documents for the search term.

apple spotlight operators

You can even use date sensitive search operators, to search for files created or edited between, before, after, or on specific dates! This makes finding things even faster and more precise, so try them out yourself.

More Specific Spotlight Search Operators

You can also get specific with operators by listing file types, kinds, and dates, like so:
kind:audio Rolling

kind:application

kind:pdf

kind:jpeg

kind:word

kind:folder

kind:image

kind:audio

date:today

date:yesterday

Advanced Spotlight Search Operators with Time Ranges

Finally, you can also search Spotlight with advanced ranges for times and dates, meaning you can find files that were modified after a specific date, created before a date, or modified within a date range. This is done by using the greater than and less than symbols < and >

date:>10/1/09 will find any file modified after November 1, 2009, note that the dates you enter must correspond to the short date format you have set in your International preferences

date:<12/31/09 will find any file modified before December 31, 2009

date:1/1/06-12/31/09 will find files modified between the two specified dates.

Example syntax for this would look something like so:

date:1/1/16-12/31/19 contract

This is really best tried out yourself rather than demonstrated, so launch Spotlight and give it a test yourself to see how it works on your own Mac with your own files.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Bill Ellis in How to, Mac OS X, Tips & Tricks

9 Comments

» Comments RSS Feed

  1. Nice set of tips. November is the 11th month, however. ;o)

  2. Gnuut says:

    Fabulous – Apple has managed to convert Spotlight into a command-line utility. Yuck!

  3. [...] you’re interested, learn how to greatly improve Spotlight searches with search operators, you will be amazed how precise you can get your Spotlight searches to [...]

  4. [...] a whole post on search operators within Spotlight if you’re [...]

  5. [...] familiar with Smart Folders, they essentially let you create a virtual folder that uses search operators from Spotlight to let that virtual folder contain any and all files that match the search [...]

  6. Rick Penner says:

    Thank you; it’s very helpful to find information like this, which isn’t officially “manualized.” It would be especially helpful (and most likely profitable) to publish some manuals, at different levels (e.g., some people just want to get their email and be done, while others are really interested in how the system works, and how things are implemented, so they can make he most of the computing power they have available. Anyway, your work here was most useful!

  7. [...] forget that you can use search operators to improve results by looking only for specified file types or dates, and more. We have plenty more [...]

  8. A Dymoke-Bradshaw says:

    Where are the NOT, AND, NOR, XOR … operators?

  9. NeilM says:

    Article text says: “[…] following syntax format “operator:specific” always separated by a semi-colon.”

    Should say “[…] separated by a colon.”

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates