Sunday 25 May 2014

Improve Spotlight Searches with Search Operators in Mac OS X

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.
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 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: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 ‘screenshot’ with the jpeg file type operator, which led Spotlight to only search jpeg files for the search term.
More Specific Spotlight Search Operators
You can also get specific with operators by listing file types, kinds, and dates, like so:
kind:application
kind:pdf
kind:jpeg
kind:word
kind:folder
kind:image
kind:audio
date:today
date:yesterday

Find Files with Date Specific Searches in Spotlight for Mac OS X
What if you need to find files created or modified on a very specific date? There are a few ways to do this, but one of the fastest tricks is using date search operators in the Spotlight search menu of OS X.
For the unfamiliar, search operators are additional signals you can provide to Spotlight to help narrow down a search beyond just looking for a file or folder name. In this case, we’ll use date operators to find files based on the day when they were created or modified.

Search for Files Based on Creation Date in Spotlight
The simplest form of using the creation date modifier is to specify an exact date to Spotlight. To try this yourself, you’d want to hit Command+Spacebar to bring up the Spotlight search in OS X, then use the following search syntax:
created:xx/xx/xxxx
This will cause Spotlight to list all files created on the provided date.
For example, to find files that were created today  you’d use the following:
date:today
Spotlight will return the list of files, apps, documents, and folders created on that date, looking something like the following:


You can also provide additional operators to show files created before or after a specific date by using the < and > symbols, like so:
created:<08/12/2016
This can be used to modify the search query so that files created before < or after > a specified date are listed.
Another helpful trick can be searching for documents based on when they were modified, that is, when they were edited manually or modified by an app or file system.

Search for Files Based on Modification Date in Spotlight
To search for documents, files, or folders on the Mac that have been modified on a specific date, use the following search operator style in Spotlight. Again, hit Command+Spacebar to summon Spotlight and try the following type of search:
modified:xx/xx/xxxx
For example, to find files modified on May 14, 2014, you’d specify that date using the following (note if you use international date formats you’d want to adjust the query to accommodate that instead):
modified:05/14/2014
This will cause Spotlight to return everything that was modified on that specific date.
Remember, results returned through Spotlight can be cut and copied directly from the menu, which helps to make the Spotlight search tool basically an extension of the broader Mac file system. Additionally, you can modify the search priorities of Spotlight to list specific file types before others, which can further add to the usefulness of this trick and the Mac search feature in general.
So launch Spotlight and give it a test yourself to see how it works on your own Mac with your own files.
Try these Spotlight tricks out the next time you’re looking for files, documents, or apps created or modified on specific dates or before or after provided dates, you’ll be happy you did.

0 comments:

Post a Comment