3.4. The Find Command

 < Day Day Up > 

How did anyone ever find anything before Spotlight? By relying one of these two techniques:

  • Using -F . That's the keystroke for the File Find command, which, for years of Macintosh history, has opened up a Find dialog box.

  • Using the Search box . That's the round-ended text box at the top of every Finder window, which, until Tiger came along, could search only within that window . See the box below for details.

In Tiger, -F still opens up a Search dialog box, and there's still a Search bar at the top of every folder window. Both of these, though, are still more entry points for Spotlight.

The File Find command (-F) opens the Search window shown in Figure 3-7. It's a lot more powerful (and complex) than the basic Spotlight menu, because it can hunt down icons using extremely specific criteria. If you spent enough time setting up the search, you could use this feature to find a document whose name begins with the letters Cro , is over one megabyte in size , was created after 6/1/05 but before the end of the year, was changed within the last week, has the file name suffix .doc , and contains the phrase "attitude adjustment." (Of course, if you knew that much about a file, you'd probably know where it is without having to use the Search window. But you get the picture.)

Figure 3-7. Unless you've first opened a folder or disk window, the new Search dialog box opens up ready to search your entire hard drive (except other people's Home folders), regardless of file type. But don't settle Spotlight has many more tricks up its software sleeve.


UP TO SPEED
The Search Bar

See the oval text box at the top of every Finder window? This, too, is a piece of the Spotlight empire. You can make your cursor jump there by pressing Option- -F. When you type a few letters of whatever you're looking for, the window instantly changes into the Search dialog box described on these pages.

In general, though, this holdover from older Mac OS X versions is less convenient than the Search dialog box, because it comes set to search your entire computernot just the open window.

You have to click the "Folder 'Music'" button (or whatever) at the top of the window to limit the search to the open window. Now you've made your point; now the Search bar will propose searching only the current window for the rest of your computing session, until you log out. (The next time, it will propose searching the whole computer again.)

You can avoid all this confusion by sticking with the -F keystroke full-time . That keystroke opens the regular Search window, which always proposes searching the open window only.


To use the Search window, you need to feed it two pieces of information: where you want it to search, and what to look for. You can make both of these criteria as simple or complex as you like.


Tip: If you open a folder window before pressing -F, the Search dialog box appears with that folder's namefor example, "Folder 'Music'"already selected. In other words, Tiger realizes that you want to confine your search to the window that's open before you.

3.4.1. Where to Look

The words at the top of the windowServers, Computer, Home, and Othersare buttons . The Search box starts out proposing to search the open window, but you can click any one of these to tell Spotlight where to search:

  • Servers refers to other computers on your network, assuming you've brought their icons to your screen as described in Chapter 13.

  • Computer means your entire hard drive, except what's in other people's Home folders.

  • Home is your own Home folder (and not, for example, the Applications folder, the Shared folder, or any other folders on your hard drive).

  • Folder "Letters to Congress" (or whatever the current window is) limits the search to the open window, as noted above.

  • Others lets you limit your search to certain disks or folders (see Figure 3-8). You could do that to make the search even faster, or just to avoid having to wade through a lot of irrelevant results.

Figure 3-8. To limit a search by restricting it to a certain disk or folder, click Others. This list box appears. Now you can drag a disk, a folder, or a set of folders directly off the desktop and into the list. Or click + and then navigate to the item you want to add. (To ditch something, click it and then click the - button.)


Once you've added a new search location to the list, it sprouts its own button at the top of the window so it's available the next time you want to search. (If you drag in a group of folders, the button says, for example, "3 folders.")


Tip: If the object of your quest doesn't show up, you can adjust the scope of the search with one quick click on another button at the top of the window, like Home or Computer. Spotlight shows you the updated list of matches without making you retype the search request.

3.4.2. What to Look For

If all you want to do is search your entire computer for files containing certain text, you may as well use the Spotlight menu described at the beginning of this chapter.

The power of the Search window , though, is that it lets you design much more specific searches, using over 125 different search criteria: date modified, file size, the "last opened" date, color label, copyright holder's name, shutter speed (of a digital photo), tempo (of a music file), and so on. Figure 3-9 illustrates how detailed this kind of search can be.

Figure 3-9. By repeatedly clicking the + button, you can turn on as many criteria as you'd like; each additional row further narrows the search. (Note to geeks : In other words, the Finder offers "and" searches, not "or" searches.)


To add a criterion to the list, click one of the + buttons at the right end of the dialog box. A new row appears in the window, whose pop-up menus you can use to specify what date, what file size, and so on. Figure 3-9 shows how you might build, for example, a search for all photo files that you've opened within the last week that contain a Photoshop layer named Freckle Removal .

To delete a row from the Find window, click thebutton at its right end.

Here's a rundown of the ways you can restrict your search, according to the options you find in the first pop-up menu of a row. Note that after you choose from that first pop-up menu (Last Opened, for example), you're supposed to use the second pop-up menu to narrow the choice (Within the Last 2 Weeks, for example), as you'll read below.


Note: It may surprise you that choosing something from the Kind pop-up menu triggers the search instantly . (In previous versions of Mac OS X, the search didn't begin until you clicked Search.) As soon as you choose Applications, for example, the window fills with a list of every program on your hard drive. Want a quick list of every folder on your entire machine? Choose Folders.(You can interrupt the search by clicking the little X in the lower-right corner of the window.)Of course, if you type something into the Search box at the top of the windowbefore or after you've used one of these pop-up menusthe list pares itself down to items that match what you've typed.
3.4.2.1. Kind

When the first pop-up menu says Kind, you can use the second pop-up menu to indicate what kind of file you're looking for: Images, Text files, PDF files, Movies, Music, Documents, Presentations, Folders, or Applications. For example, when you're trying to free up some space on your drive, you could round up all your gigantic movie files. (As noted above, choosing one of these file types makes the window begin to fill with matches automatically and instantly.)

And what if the item you're looking for isn't among the nine canned choices in the second pop-up menu? What if it's an alias, or a Photoshop plug-in, or some other type?

That's what the Others option is all about. It's the rabbit hole into a staggering array of file typeshundreds, ranging alphabetically from ".Net document" to "ZIP archive"that Spotlight knows about.

To specify which of these oddball file types you want to round up, you can either choose from the Others pop-up menu shown in Figure 3-10, or you can type part of a file type's name into the text box. Mac OS X fills in the closest match automatically.

Figure 3-10. To search for an oddball file type, choose Others from the second pop-up menu (A). Now you can "type select" the file type you want by typing into the text box (B) or use the far right pop-up menu (C) to see your 216 options.


3.4.2.2. Last Opened/Last Modified/Created

When you choose one of these options from the first pop-up menu, the second pop-up menu lets you isolate files, programs, and folders according to the last time you opened them, the last time you changed them, or when they were created.

  • Today, Since Yesterday, This Month , and the other commands at the top of the pop-up menu offer quick, canned time-limiting options.

  • Exactly, Before, After , and Within Last at the bottom of the pop-up menu let you be more precise. If you choose Before, After, or Exactly, your criterion row sprouts a month/day/year control that lets you round up items that you last opened or changed before, after, or on a specific day, like 5/27/05. If you choose Within Last, you'll see that you can limit the search to things you've opened or changed within a specified number of days, weeks, months, or years.

These are awesomely useful controls, because they let you specify a chronological window for whatever you're looking for.


Tip: You're allowed to add two Date rowsa great trick that lets you round up files that you created or edited between two dates. Set up the first Date row to say "is after," and the second one to say "is before."In fact, if it doesn't hurt your brain to think about it, how about this? You can even have more than two Date rows. Use one pair to specify a range of dates for the file's creation date, for example, and two other rows to limit when it was modified.Science!
3.4.2.3. Keywords

Keywords are invisible Web-page text labels used so people can search for them. If you're in the practice of saving Web pages onto your hard drive, you can use the keyword search feature much the way online search pages like Yahoo do: to call up a Web page according to what it's about , rather than what words actually appear on it.


Tip: What Keyword searches find most of the time is saved Web pages (including Safari archives and HTML documents). But remember that Mac OS X's own online help system is built out of thousands of HTML (Web-type) pages tooso a Keyword search is a great way to search the online help without actually opening the Help program.
3.4.2.4. Color Label

Mac OS X lets you not only tag certain icons with text-and-color labels, but alsoperhaps even more importantlets you round them up later, for backing up, deleting, or burning to a CD en masse, for example.

Section 2.6 describes how to flag icons with labels. Now comes the payoff: finding all the icons with a specific label, wherever they may be hiding. The criterion row sprouts seven colored dotsrepresenting the seven available color labelsplus an X, which means "find all icons with no label applied."

3.4.2.5. Name

The beauty of Spotlight is that it finds text anywhere in your files, no matter what their names are. That's why Apple demoted this optionthe icon's nameto such a low position in the pop-up menu.

Anyway, when you want to search for an icon by the text that's only in its name , this is your ticket. Capitalization doesn't matter.

Of course, if all you want to do is find files whose names include Sales , you may as well save yourself all of this reading and use the Spotlight menu. But using the Search window offers you far more control, thanks to the second pop-up menu that offers you these options:

  • Contains . The position of the letters you type doesn't matter. If you type then , you find files with names like "Then and Now," "Authentic Cajun Recipes," and "Lovable Heathen."

  • Starts with . The Find program will find only files beginning with the letters you type. If you type then , you find "Then and Now," but not "Authentic Cajun Recipes" or "Lovable Heathen."

  • Ends with . If you type then , you find "Lovable Heathen," but not files called "Then and Now" or "Authentic Cajun Recipes."

  • Is . This option finds only files named precisely what you type (except that capitalization still doesn't matter). Typing then won't find any of the file names in the previous examples. It would unearth only a file called simply "Then." In fact, a file with a file name suffix, like "Then.doc," doesn't even qualify.

    (If this happens to you, though, here's a workaround: From the first pop-up menu, choose Other; in the dialog box, pick Filename. The Filename criterion ignores extensions; it would find "Then.doc" even if you searched for "then.")


Tip: If you listen closely, you can hear the cheers of propeller-heads worldwide over this development: Mac OS x 10.4 lets you perform "and" searches. That is, you can add Name rows to your Find setup more than once , for even more specific searches.For example, if you create one Name row to look for apple , a second Name row to seek out corp , and a third Name row to hunt down memo , you round up only files whose names include all three of those terms ("Apple Corporate Memo.doc," "Memo to Apple Corps of Dallas").
3.4.2.6. Contents

You can think of this option as the opposite of Name. It finds only the text that's inside your files, and completely ignores their icon names.

That's a handy function when, for example, a document's name doesn't match its contents. Maybe a marauding toddler pressed the keys while playing KidPix, inadvertently renaming your doctoral thesis "xggrjpO#$5%////." Or maybe you just can't remember what you called something.

3.4.2.7. Size

Using this control, and its "Greater than"/"Less than" pop-up menu, you can restrict your search to files of a certain size. Use the second pop-up menu to choose KB (kilobytes), MB (megabytes), or GB (gigabytes).

3.4.2.8. Other

If this were a math equation, it might look like this: options X options=overwhelming .

Choosing Other from the first pop-up menu opens a special dialog box containing at least 115 other criteria. Not just the big kahunas like Name, Size, and Kind, but far more targeted (and obscure) criteria like "Bits per sample" (so you can round up MP3 music files of a certain quality), "Device make" (so you can round up all digital photos taken with, say, a Canon camera), "Key signature" (so you can find all the GarageBand songs you wrote in the key of F sharp), "Pages" (so you can find all Word documents that are really long), and so on. As you can see in Figure 3-11, each one comes with a short description.


Note: As of Mac OS X 10.4.1, the Visibility option is broken. It doesn't find invisible icons.

Figure 3-11. Each option comes with an appropriate set of "find what?" controls. For example, if you choose a criterion that requires a number, like "Pixel height" (how tall a photo is), you'll get a "Greater than"/ "Less than" pop-up menu and a box where you can type in a number. Type in the parameter you want, and let Spotlight do the rest.


You may think that Spotlight is offering you a staggering array of file-type criteria. In fact, though, big bunches of information categories (technically called metadata ) are all hooks for a relatively small number of document types. For example:

  • Digital photos and other graphics files account for the metadata types alpha channel, aperture, color space, device make, device model, EXIF version, exposure mode, exposure program, exposure time, flash, FNumber, focal length, ISO speed, max aperture, metering mode, orientation, pixel height, pixel width, red eye, resolution height, resolution width , and white balance .

  • Digital music files have searchable metadata categories like album, audio bit rate, bits per sample, channel count, composer, duration, General MIDI sequence, key signature, lyricist, musical genre , recording date, sample rate, tempo, time signature, track number, and year recorded . There's even a special set of parameters for GarageBand and Soundtrack documents, including instrument category, instrument name, loop descriptors, loop file type, loop original key , and loop scale type .

  • Microsoft Office documents can contain info bits like authors, contributors, fonts, languages, pages, publishers , and contact information ( name, phone number , and so on).

Now, you could argue that in the time it takes you to set up a search for such a specific kind of data, you could have just rooted through your files and found what you wanted manually. But heyyou never know. Someday, you may remember nothing about a photo you're looking for except that you used the flash and an F-stop of 1.8.

3.4.3. What to Do with Search Results

You can manipulate the list of search results much the way you'd approach a list of files in a standard Finder list view window. You can move up or down the list by pressing the arrow keys, scroll a "page" at a time with the Page Up and Page Down keys, and so on. You can also highlight multiple icons simultaneously , the same way you would in a Finder list view: Highlight all of them by choosing Edit Select All; highlight individual items by -clicking them; drag diagonally to enclose a cluster of found items; and so on.

Or you can proceed in any of these ways:

3.4.3.1. Find out where something is

If you click once on any item in the results list, the bottom edge of the window becomes a folder map that shows you where that item is.

For example, in Figure 3-12, the notation in the Path strip means: "The About AppleScript Studio.pdf icon you found is in the Developer Tools folder, which is in the Installers folder, which is in the Applications folder, which is on the hard drive called Macintosh HD."

To get your hands on the actual icon, choose File Open Enclosing Folder (-R). Mac OS X highlights the icon in question, sitting there in its window wherever it happens to be on your hard drive.

3.4.3.2. Open the file (or open one of the folders it's in)

If one of the found files is the one you were looking for, double-click it to open it (or highlight it and press either -O or -down arrow). In many cases, you'll never even know or care where the file wasyou just want to get into it.

You can also double-click to open any of the folders that appear in the folder map in the bottom half of the window. For example, in Figure 3-12, you could double-click the selected PDF icon to open it, or the Developer Tools folder to open it , and so on.

3.4.3.3. Move or delete the file

You can drag an item directly out of the found-files list and into a different folder, window, or diskor straight to the Dock or the Trash. If you click something else and then re-click that item in the results list, the folder map at the bottom of the window updates itself to reflect the file's new location.

Figure 3-12. Click a result once to see where it sits on your hard drive (very bottom). If the window is too narrow to reveal the full names of the folders in the Path strip, run your cursor over them without clicking. As your mouse moves from one folder to another, Tiger briefly reveals its name, compressing other folders as necessary to make room. (Sub-tip: You can drag icons into these folders, too.)


3.4.3.4. Rename the file

You can even rename a highlighted file in the Search Results window, just as though it's sitting in a Finder list view window. Click its name once, wait for the renaming rectangle to appear, and then type over the old name. (Be careful, though: if you rename an icon so that it no longer matches your original search criteria, it instantly disappears from the list!)

3.4.3.5. File-menu commands

After highlighting an icon (or icons) in the list of found files, you can use the commands in the File menu, including Get Info, Add to Sidebar, and Move to Trash.

3.4.3.6. Collapse the list

By clicking the flippy triangles , you can collapse or expand the category headings, just as in the regular Spotlight window. Once again, you can also Option-click a flippy triangle to expand or collapse all of them at once.


Note: This results window offers several other controls that should look familiar if you've experienced the thrill of the Spotlight window. For example, the blue heading for Images offers a slideshow button, a list-view button, and a thumbnails-view button. And every list-view item offers an button at the far right of its row, for quick detailed information.
3.4.3.7. Copy a file

To copy a file, Option-drag it out of the Search Results window and onto the desktop, into a different window, or onto a disk or folder icon. Alternatively, highlight the file and then choose Edit Copy "Bunion Treatments.doc (or whatever the file's name is). Then click inside a different folder window, or click a folder itself, before choosing Edit Paste.

3.4.3.8. Make an alias

You can make an alias for one of the found items exactly the way you would in a Finder window: Drag it out of the window while pressing -Option. The alias appears wherever you release the mouse (on the desktop, for example).

3.4.3.9. Start over

If you'd like to repeat the search using a different search phrase, just edit the text in the Search bar (press Option- -T to get there). The results pane updates itself as you type.

3.4.3.10. Give up

If none of these avenues suits your fancy, you can close the Search window as you would any other ( -W).

 < Day Day Up > 


Mac OS X. The Missing Manual
Mac OS X Snow Leopard: The Missing Manual (Missing Manuals)
ISBN: 0596153287
EAN: 2147483647
Year: 2005
Pages: 506
Authors: David Pogue

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net