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

Home > Articles > Apple > Operating Systems

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

Using Spotlight and Quick Look

Spotlight was a significant new feature in Mac OS X v10.4 that revolutionized the way users searched for files on their Macs. Spotlight enables you to perform nearly instantaneous searches that go wider and deeper than previous Mac desktop search technology. Spotlight has the ability to go beyond simple file system searches and actually search for relevant metadata inside application files and databases. For example, an application like Address Book stores contact information in a database that appears opaque to the file system. Nevertheless, Spotlight can return search results from Address Book along with results from other databases and the entire file system hierarchy nearly instantly.

Though Spotlight was pretty amazing when it debuted, Apple added a few more tricks to Spotlight over the years. These included the ability to search through the contents of shared files from other Mac clients, servers, AirDisk volumes over the network, and Time Machine backups. Lion introduced the ability for Spotlight searches to automatically return results from your default web search engine and Wikipedia.

Apple has also incorporated the ability to use advanced search operations while performing Spotlight searches from the Finder or menu bar. Advanced Spotlight search operations include:

  • The use of multiple search criteria types in a single search
  • The use of Boolean logic by using AND, OR, or NOT
  • The use of exact phrases and dates by using quotation marks
  • The use of search ranges by using greater-than and less-than symbols.

Another feature, dubbed Quick Look, augments Spotlight by allowing you to quickly preview the content of most files even if you don’t have the application that created the file installed on your Mac. The combination of Spotlight and Quick Look allows you to locate and preview items with unmatched ease and speed.

Using Spotlight for Searching

You can initiate a Spotlight search any time by clicking the Spotlight icon on the far right of the menu bar or using the Command-Space bar keyboard shortcut. The Spotlight search is so fast that the results will actually change in real time as you type in your search query. In the results list, moving your mouse over an object (but not clicking) or using the arrow keys will open a Quick Look preview of the content. Clicking on an item or pressing the Return key with a result selected will open it immediately.


Selecting Show All in Finder from the Spotlight search results menu will open a new Finder window with the results. You could also arrive at this same window by opening a new Finder window and entering your search in the Spotlight field from the Finder’s toolbar, or by selecting File > Find from the menu bar, or using the Command-F keyboard shortcut. Selecting an item from the search results will show you the path to the selected item at the bottom of the Finder window. Selecting an item and then tapping the Space bar will open a Quick Look preview of the selected item.


You can refine your Spotlight search from a Finder search window by clicking the small plus buttons on the right below the search field. This will allow you to add as many specific search attributes as you need. After you add a new search attribute, click the first word in the search attribute to choose another type from the pop-up menu.


If you don’t see the search attribute you’re looking for, you can add literally dozens of other attributes that aren’t enabled by default. To enable additional search attributes, select any attribute, and from the pop-up menu select the Other option. This will reveal a dialog that allows you to add search attributes to the pop-up menu. Two especially useful search attributes for administrators are “File visibility” and “System files,” neither of which is shown by default in any Spotlight search.


Clicking the Save button on the right will save these search criteria as a Smart Folder. Smart Folders are like normal folders in that they can be given a unique name and placed anywhere you like, including the Finder’s sidebar. Smart Folders are special because their contents will always match your search criteria no matter how the file system changes. In fact, the All My Files item in the Finder’s sidebar is simply a predefined Smart Folder searching for the most recently opened documents in the user’s home folder.


Using Quick Look for Previewing

Again, Quick Look allows you to preview nearly any file type without having to open any additional applications, or even having those applications installed on your Mac. This makes Quick Look the most convenient method to view the contents of any file. Quick Look previews can be accessed, or dismissed, by pressing the Space bar from any Finder view, the Time Machine restore interface, most open and save browser dialogs, the Mail application, or any other application that supports Quick Look. A new feature in Lion makes Quick Look preview windows stay open in the Finder until closed, just like traditional windows. The Quick Look close window button is in the top-left corner, again just like a traditional window. You can also quickly dismiss the Quick Look preview by pressing the Space bar again.


With the Quick Look preview window open, you can resize the window by clicking and dragging any edge of the window, or you can go full-screen by clicking the twin arrow button at the top right of the preview window. Note the Open with Application button next to the full-screen button. Use the arrow keys to navigate and preview the items adjacent to the original previewed item in the Finder. If the previewed file has multiple pages, you’ll be able to scroll through the document. In some cases—Keynote presentations, for example—Quick Look will show a thumbnail preview of each slide, allowing you to scroll through the thumbnails as well. Finally, if you select multiple items to preview, the Quick Look window will allow some basic slideshow features via buttons at the top left of the window.


Quick Look technology is also used to provide the Finder with previews for files in icon view, previews in column view, and the preview section of the Get Info and Inspector windows. Finally, Quick Look also provides previews for the Finder’s Cover Flow view. This view allows you to browse folder content in a similar way to browsing with iTunes or Apple’s other mobile devices. Quick Look can be accessed from any Finder window by selecting its icon in the toolbar.


Quick Look Plug-ins

Quick Look is able to preview an ever-growing variety of file types using a plug-in technology. Each Quick Look plug-in is designed to preview specific types of files. Many Quick Look plug-ins are included by default, but Apple and third-party developers can create additional plug-ins to expand Quick Look’s preview capabilities.

Included Quick Look plug-ins enable you to:

  • Preview any audio or video file that can be decoded by QuickTime
  • Preview a variety of graphics files, including many digital camera files, PDF files, EPS files, and any standard graphics file
  • Preview a variety of productivity files, including standard text files, script files, and files created by the iWork and Microsoft Office suites
  • Preview a variety of Internet-centric files, including mailboxes, iChat transcripts, and web archives

Quick Look plug-ins, like any other system resource, are stored inside the various Library folders. Apple’s built-in Quick Look plug-ins are always found in the /System/Library/QuickLook folder and sometimes appear in the /Library/QuickLook folder. Third-party plug-ins should always be installed in either /Library/QuickLook or the ~/Library/QuickLook folder, depending on who needs access to them.

Understanding the Spotlight Service

Spotlight is able to perform wide and deep searches quickly because it works in the background to maintain highly optimized databases of indexed metadata for each local volume. When you first set up Lion, it will create these databases by indexing all the available local volumes. The system will also index new local volumes when they are first attached.

On your Mac, a background process called mds, short for metadata server, will automatically update the index databases on the fly as changes are made throughout the file system. Because these indexes are kept current, the Spotlight process need only search through the databases to return thorough results. Essentially, Spotlight preemptively searches everything for you in the background so you don’t have to wait for the results when you need them.

You can find the Spotlight general index databases at the root level of every volume in a folder named .Spotlight-V100. A few applications maintain their own databases separate from these general index databases. One example is the built-in email application Mail. It maintains its own optimized email database in each user’s folder at ~/Library/Mail/Envelope Index. Also, the Spotlight index database for a Legacy FileVault user is stored at the root level inside his encrypted home folder for enhanced security. If you are experiencing problems with Spotlight, you can force it to rebuild the index databases by deleting them and restarting your Mac or by managing the Spotlight settings as covered later in this chapter.

Spotlight Security

In order to provide security on par with the rest of the file system, Spotlight also indexes every item’s permissions. Even though Spotlight indexes every item on a volume, it will automatically filter search results to show only items that the current user has permissions to access. There is still a security concern, though, when users search through locally attached non-system volumes because they can choose to ignore ownership on these volumes. In other words, all users can search through locally attached non-system volumes, including mounted disk images, even if another user attached the device.

Spotlight Plug-ins

Spotlight is able to create indexes, and thus search, from an ever-growing variety of metadata using a plug-in technology. Each Spotlight plug-in is designed to examine specific types of files or databases. Many Spotlight plug-ins are included by default, but Apple and third-party developers can create additional plug-ins to expand Spotlight’s search capabilities.

Included Spotlight plug-ins enable you to:

  • Search via basic file metadata, including name, file size, creation date, and modification date
  • Search via media-specific metadata from picture, music, and video files, including time code, creator information, and hardware capture information
  • Search through the contents of a variety of file types, including text files, iLife related files and databases, Photoshop files, PDF files, iWork files, and Microsoft Office files
  • Search through personal information like Address Book contacts and iCal calendar events
  • Search for correspondence information like the contents of Mail emails and iChat chat transcripts
  • Search for highly relevant information like your favorites or web browser bookmarks and history

Spotlight plug-ins, like any other system resource, are stored inside the various Library folders. Apple’s built-in Spotlight plug-ins are always found in the /System/Library/Spotlight folder and sometimes appear in the /Library/Spotlight folder. Third-party plug-ins should always be installed in either the /Library/Spotlight or the ~/Library/Spotlight folder, depending on who needs access to it.

Managing Spotlight Settings

From the Spotlight preferences, any user can choose to disable specific categories from appearing in Spotlight searches. A user can also prevent volumes from being indexed by specifying those volumes in the privacy list. However, by default all new volumes are automatically indexed, so a user must manually configure Spotlight to ignore a volume.

The Spotlight privacy list is a computer-level setting that remains the same across all user accounts, but it’s not protected by administrative access, which means any user can change the privacy list. In this case, the Spotlight privacy list isn’t any less secure than the rest of the file system, as any user can still have full access to locally connected non-system volumes because the system defaults to ignoring ownership on those volumes.

To change Spotlight settings:

  1. Open the Spotlight preferences by choosing Apple menu > System Preferences, and then clicking the Spotlight icon.

    The Spotlight preferences will open to the Search Results tab, allowing you to disable specific categories from the search results.

  2. Simply deselect the checkboxes next to the categories you wish to ignore.

    You can also drag categories to change their order in the search results. Each user has her own separate Search Results settings.

  3. To prevent Spotlight from indexing specific items, click the Privacy tab to reveal the list of items for Spotlight to ignore.

    To add new items, click the small plus icon at the bottom of the privacy list and choose the items from a browser dialog, or simply drag and drop items into the privacy list.

  4. You can delete an item from the privacy list by selecting it and then clicking the minus icon at the bottom of the list.

All Spotlight settings are applied immediately. If you add an entire volume to the privacy list, then the system will delete the Spotlight index database from that volume. In turn, removing a volume from the privacy list will rebuild the Spotlight index database on that volume. This technique, to rebuild the Spotlight index databases by adding, then removing, a volume from the privacy list, is the most common method to resolve problematic Spotlight performance.

  • + Share This
  • 🔖 Save To Your Account

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Peachpit products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive:

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020