Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Apple > Operating Systems

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Find Files with Spotlight

Spotlight is wired deep into OS X and is used by applications such as Mail and the built-in Help system. Whenever you save a change to a document, Spotlight updates its index in the background.

You don’t need to do anything to activate Spotlight; it’s just there. Occasionally you may notice the Spotlight icon (in the right corner of the menu bar) displaying a pulsating dot, which indicates that Spotlight is indexing new material.

Perform a Spotlight search

There are two entry points for Spotlight in the Finder: the Spotlight icon on the menu bar (which is available in all applications) and the Search field in a window’s toolbar.

Search from the Spotlight menu

The idea behind Spotlight is that it’s quick and unobtrusive. The Spotlight icon in the menu bar is my first stop for searching.

  1. Click the Spotlight icon or press Command-spacebar.
  2. Start typing what you’re looking for. Spotlight begins to display results as you type.
  3. If you see what you’re looking for, click its name to open it (or use the arrow keys to select it and press Return). The Top Hit is always automatically selected, so you can often just start typing and press Return to jump to the item.

    If you don’t spot a match, click or select Show All in Finder to view the results in a Finder window (see the next section).

Figure 4.10

Figure 4.10 A Spotlight search from the menu bar

Search within a Finder window

Performing a search within a Finder window gives you more options—and more results—than the menu bar.

  1. In any Finder window, enter your search term in the Search field. Or, choose File > Find to activate the Search field in the active window (or to open a new window if one wasn’t already open). As with the menu bar, results begin to appear as soon as you start typing.
  2. Narrow your search, if necessary, by specifying additional search criteria (Figure 4.11, on the next page. Click This Mac to search the entire computer; click “folder name” to limit the search to just the active folder; or click Shared to scan shared disks and connected network volumes.

    Figure 4.11

    Figure 4.11 A Spotlight search in a Finder window

    Normally a search looks through the contents of all indexable files on your computer, but you can limit the query to just file and folder names by choosing the “Filename contains” item from the menu that appears as you type.

  3. To further narrow the search, click the plus sign (+) icon on the search bar to apply additional criteria (Figure 4.12).

    Figure 4.12

    Figure 4.12 Use search criteria to narrow the list.

Hide data from Spotlight

Spotlight builds its index from everything on your hard disk, but you may want to exclude data such as personal correspondence or financial documents from casual searches. Or, you may have a secondary hard disk being used as a scratch disk to shuttle temporary files for an application like Photoshop or Final Cut Pro.

  1. Open the Spotlight preference pane in System Preferences.
  2. Click the Privacy button.
  3. Drag the folder or hard disk to the list area. Or, click the Add (+) button below the list and locate the item to exclude.

Smart Folders

Here’s where you can really get productive. Not only can you perform searches using multiple criteria, but that search can be saved as a Smart Folder whose contents are updated depending on the search. For example, here’s how to set up a Smart Folder that displays documents created in the last week (Figure 4.13).

Figure 4.13

Figure 4.13 Creating a Smart Folder

  1. Choose File > New Smart Folder to open a new Finder window with the search criteria enabled.
  2. Click the plus sign (+) to add a new attribute.
  3. Set the Kind attribute to Document.
  4. Click the plus sign (+) again.
  5. Set that attribute’s first pop-up menu to “Created date,” and specify that it is within the last 7 days.
  6. Click the Save button to save the Smart Folder. Give it a name (and, optionally, a location if you want it somewhere other than Mavericks’ Saved Searches folder). Make sure the Add To Sidebar checkbox is selected if you want it to appear in the sidebar.

No documents are actually stored in a Smart Folder. Instead, it acts as a portal that filters just the files you want to see, updated live.

  • + Share This
  • 🔖 Save To Your Account