Mac 101: Seek and find
As we meander down life’s path, we tend to pick up bits of this and that. And, over time, these things pile up to the point where, if we’re not organized, we lose track of them. And this often results in cries of “Honey/Mom/Dad/Jeeves, have you seen my glasses/lunchbox/dueling pistols!?” Wouldn’t it be great if the answer was more helpful than, “Well, where did you last see them?”
While there may be little we can do about locating these kinds of physical treasures, we needn’t have that happen with the files and folders on our Macs. And to prevent exactly this kind of thing, Apple has brought us Spotlight, technology built into OS X that allows us to easily find the items we seek.
It works this way: When you first install Mac OS X, Spotlight kicks into gear and begins indexing the contents of your drive. It keeps track of not only the names of your files and folders, but also their contents, the day and time each was created, the kind of files they are, and much more. As you create new files and folders, Spotlight indexes them as well, adding all this information to a hidden database file that it can later query to help you locate the stuff on your Mac.
And how exactly do you locate that stuff? Let me enumerate the ways:
In the top right of the Mac’s menu bar you’ll spy a magnifying glass icon. This denotes the Spotlight menu. Click on it and the menu appears, complete with an empty Spotlight field. It’s into this field that you type the first few letters of what you seek. For example, if you have a document somewhere on your Mac that details your grandmother’s recipe for mocha meatballs, entering mocha in this field will likely produce the file you’re after (though others that contain the word mocha will appear as well). These files are categorized by type—Documents, Messages & Chats, Contacts, Events, Images, Music, PDF Documents, and Presentations, for example. If you know the type of file you’re looking for, you can ignore other kinds of results.
Once you’ve found the file you’re after, you can click on it to launch it within the application associated with it. Or, if the highlighted result is the correct one, just press Return.
But what if you’ve entered a search term, a list of documents appears, and you’re still not sure which is the right one? Just hover your cursor over a file to highlight it, and a small preview window will appear that shows you some of the contents of that file. If it’s what you’re after, press Return to open it. If not, highlight another document and wait for its preview to appear.
“But hang on,” you say. “When I do this, I see lots of results. Is there any way to limit what appears to, say, the exact title of the file you want?”
Yes, indeed. Just enclose your search in quotes. For instance, if you want to find a document titled Grandma’s Mocha Meatballs, surround your search in quotes: “Grandma’s Mocha Meatballs.” Only those files that match this exact phrase will appear.
“Sorry to interrupt yet again,” you interrupt yet again, “but surely there must be a way to limit those searches so that I can see just results that fit a certain category.”
There is. Spotlight will filter by keyword. Keywords can include terms like name, kind, date, author (the person who created the document), and so on. For example, if I were looking for image files that included my name in the title I’d enter
kind:image breen. (The format is important: Leave no spaces between keywords and the colon, and then enter a space and type the search term or phrase.) And you can gang together keywords. If I wanted to find image files with just my name in them that were created today, I’d type
kind:image date:today breen.
You can additionally create Boolean searches. (Named after 19th century English mathematician George Boole, who made my high school years less enjoyable.) The general idea is that you can alter what you’re looking for based on true or false conditions. In Spotlight this means using AND, OR, and NOT within your searches (and no, I’m not yelling at you, the words must be in all capital letters.)
For example, if I wanted to find something that included both sandwich and aardvark, I’d enter into Spotlight sandwich AND aardvark. Any items that include both terms will appear in the list of results. If I instead enter
sandwich OR aardvark, the results will include any items that include either of these terms. And if I type
sandwich NOT aardvark, I see only files that include sandwich but make no mention of Africa’s ant bear.
If you find there are certain kinds of results you see time and again that hold no interest for you, you can filter out those results. To do that, choose Spotlight Preferences from the Spotlight menu. (Or click on the Apple menu, choose System Preferences, and click on Spotlight in the resulting window.)
In the Spotlight window that appears, click on the Search Results tab if it isn’t already selected. Below is a list of items that Spotlight will search for. Uncheck those that you don’t wish to appear in the results list. For example, if you find your results cluttered with email messages that you don’t intend to search, uncheck the Messages & Chats item. If webpage search results hold no interest for you, uncheck the Webpages item.
You can also keep Spotlight from searching certain locations on your Mac. To do that, click the Privacy tab and then click the plus-sign button (+) at the bottom of the currently empty list. In the sheet that appears, navigate to the folder that you don’t want to search—your Downloads folder, for example—and click Choose. That folder will now be excluded from searches. You can exclude additional folders by repeating this process.
Why would you want to do this? Perhaps someone else uses your Mac and, specifically, does so using your user account. If you have files that you’d like to keep more-or-less private, placing them in a folder that’s then excluded from search will prevent sensitive files from being easily exposed to other people via Spotlight. If this person has an account of their own, you needn’t be concerned. Spotlight will not search the contents of other users’ accounts. (I’ll talk a lot more about users and having multiple user accounts on your Mac in an upcoming column.)
While you’re looking at the Spotlight window, note the two keyboard shortcuts at the bottom. By default, you can invoke Spotlight by pressing the Command key and spacebar. If instead you want to open a search window (which I’ll discuss shortly), press Command-Option-Spacebar. If you like, you can change these keyboard shortcuts by clicking on the arrow next to the shortcut and choosing another shortcut, or you can simply highlight the shortcut and press the keys that you’d like to use instead.
Mac 101: Seek and findNext Page