- Table of Contents
- Copyright
- About the Author
- Acknowledgments
- Tell Us What You Think!
- Introduction
- Part I: Introduction to Mac OS X
- Chapter 1. Mac OS X Component Architecture
- Chapter 2. Installing Mac OS X
- Chapter 3. Mac OS X Basics
- Chapter 4. The Finder: Working with Files and Applications
- Chapter 5. Running Classic Mac OS Applications
- Part II: Inside Mac OS X
- Chapter 6. Native Utilities and Applications
- Chapter 7. Internet Communications
- Chapter 8. Installing Third-Party Applications
- Part III: User-Level OS X Configuration
- Chapter 9. Network Setup
- Chapter 10. Printer and Font Management
- Chapter 11. Additional System Components
- Part IV: Introduction to BSD Applications
- Chapter 12. Introducing the BSD Subsystem
- Chapter 13. Common Unix Shell Commands: File Operations
- Part V: Advanced Command-Line Concepts
- Chapter 14. Advanced Shell Concepts and Commands
- Chapter 15. Command-Line Applications and Application Suites
- Chapter 16. Command-Line Software Installation
- Chapter 17. Troubleshooting Software Installs, and Compiling and Debugging Manually
- Chapter 18. Advanced Unix Shell Use: Configuration and Programming (Shell Scripting)
- Part VI: Server/Network Administration
- Chapter 19. X Window System Applications
- Chapter 20. Command-Line Configuration and Administration
- Chapter 21. AppleScript
- Chapter 22. Perl Scripting and SQL Connectivity
- Chapter 23. File and Resource Sharing with NetInfo
- Chapter 24. User Management and Machine Clustering
- Chapter 25. FTP Serving
- Chapter 26. Remote Access and Administration
- Chapter 27. Web Serving
- Part VII: Server Health
- Chapter 28. Web Programming
- Chapter 29. Creating a Mail Server
- Chapter 30. Accessing and Serving a Windows Network
- Chapter 31. Server Security and Advanced Network Configuration
- Chapter 32. System Maintenance
- Appendix A. Command-Line Reference
- Appendix B. Administration Reference
Sherlock
When Sherlock was introduced in System 8.5, it signaled the beginning of Apple's integration of operating system functions with the Internet. Sherlock provides a universal Find feature that can search for files, text within files, and even Web sites. Some people might find it hard to get excited about a search tool, but it's difficult to understand the power of Sherlock until you try it. A friend of mine who recently moved to the Macintosh platform cites Sherlock as the feature that made her take the plunge. For anyone who needs instant access to information, no matter where it is stored, nothing comes close.
Sherlock Interface
Sherlock is not one tool, but three. Its most basic operation is as a file search utility. Type in a few characters from the filename you're looking for and let Sherlock go. In addition, Sherlock is a file indexer. When not actively searching, Sherlock compiles a database of the text contents of files on your drive. After the database is built, searching for a word or phrase takes a matter of seconds. Finally, Sherlock is an extensible Internet search tool that can perform Web searches on dozens of search engines simultaneously. Results are ranked and displayed with a summary of found pages. A single click launches the preferred Mac OS X Web browser to view the Web site.
Despite its advanced functionality, Sherlock works from within the extremely simple interface shown in Figure 7.24.
Figure 7.24 All Sherlock's features are accessed from this simple interface.
The Sherlock window is divided into three panes, which can be resized using equal-sign handles. The top pane contains collections, or channels, of searches. There are eight default channels, from left to right:
- Files and File Contents— Search local drives for information.
- Internet— General information Web sites.
- People— LDAP searches for people.
- Apple— Search through Apple's information library. Useful for locating tech notes and errata.
- Shopping— E-commerce and auction Web sites.
- News— CNN and other news sources.
- Reference— Reference material, such as Dictionary.com and Encyclop e dia.com.
- Entertainment— Movie, TV, and music Web sites.
Clicking a channel icon switches to that search collection. If you don't like the ordering of the icons, you can drag them to any available icon well in the top pane. You can also create new channels based on your own favorite search engines or new search plug-ins that you've downloaded from the Internet.
In the center of the Sherlock window are the search criteria and results. Before searching, the pane includes the available objects to search. After the search, the pane shows only the results. Clicking the back arrow returns to the search objects. The results shown in this pane are interactive. You can launch programs and applications by double-clicking their icons. Dragging a Web site URL to the Finder creates a shortcut to that URL. Dragging a file or folder moves that object to a new location. This is understood by trying it; so, don't worry if it doesn't quite make sense yet.
The lower portion of the window is the detail pane. After searching, if a result is selected, the details about that item are displayed. For file and content searches, it displays the path to that file. Content searches show a text snippet surrounding the located string. In Web searches, the URL and summary text are provided.
Now, let's see how this thing actually works.
Performing File and Content Searches
To perform a file search, select the first icon in the channel tray or choose Files (Command+F) from the Channels menu. The file search screen is shown in Figure 7.25.
Figure 7.25 Use the file search screen to locate files by their name.
Each of the available search objects (hard drives, CD-ROMs, network volumes, folders, and so on) is listed. By default, only the mounted hard drives and your home directory are available. You can drag additional folders into the list to create additional search objects. This lets you limit your searches to only a portion of a hard drive. Click the check box in front of the objects you want to include in the search.
If you want to search the contents of files (rather than the filenames), you must first index the files. By default, Sherlock will try to index the search volumes automatically. To force a volume to be indexed, choose Index Now from the File menu when the desired search volume is selected. The indexing process might take a few minutes or a few hours to complete, depending on the amount of data to be scanned.
To search for a file by name, click the File Names radio button, and enter your search text in the field. Press Enter or click the Search button (shaped like a magnifying glass) to start the search.
In a few moments, the search results will be displayed. To stop the search in progress, click the Search button again. Figure 7.26 shows a completed search for Java. For each result, Sherlock lists the filename, kind of file, date it was modified, and its size. One of the files has been highlighted, and the path is shown in the details pane.
Figure 7.26 Choose the objects to search and then click the Search (magnifying glass) button.
Searching for file contents is exactly the same. Just click the Contents radio button, select the search volumes, enter the search text, and go. Unlike the filename search, the content search includes a relevance field in the result listing. This ranks how closely Sherlock matched your search text to the document. The larger the relevance bar, the better the match is.
Because filename and contents are only a few of the possible criteria you might want to search for, Apple included a custom search feature to create new types of searches. To use a custom search, click the Custom radio button, and then choose from the pop-up menu. Four default custom searches are available from the Custom menu: Applications, files larger than 1MB, files modified today, and files modified yesterday.
In addition to the four custom options, you can use the Edit selection in the Custom menu to add your own search type. Sherlock will open the More Search Options window to create your own search types. Click the Advanced Options disclosure push button to see even more available search criteria. Figure 7.27 shows the expanded search options window.
Figure 7.27 Don't see the search you want? Add your own.
Choose from any (or all) of these available options:
- File name— Match based on the filename. Use the pop-up menu to choose how the filename matches the given string.
- Content includes— Match only files that contain a particular string in their content (this does not require file indexing).
- Date created— Select based on the file's creation date.
- Date modified— Select based on the file's last modification date.
- Size— Match files depending on their size. This is useful for finding those pesky archives that eat up tons of disk space.
- Kind— Search for a particular type of file, such as an application, folder, or alias.
- File type— Choose files based on their four-character file type.
- Creator— Choose files based on their four-character creator type.
- Version— Select files and applications based on stored version information.
- Folder— Find folders based on certain criteria, such as being empty or mounted from a server.
- File/folder (locked)— Find files and folders based on their lock status.
- Name/icon (locked)— Find files based on name or icon lock status.
- Has (icon)— Select files and folders based on whether they have custom icons.
- Is (visible)— File files or folders based on whether they are visible in the finder.
After you set your custom options, click OK to use the custom search. If you've created a search that you might want to use repeatedly, click Save As to enter a name; your new search will now appear under the Custom pop-up menu. Finally, if you happen to be editing a search and want to delete it, click Delete to remove the custom search.
Performing Internet Searches
To search the Internet, choose one of the available Internet search channels. In the center pane of the Sherlock window, you'll see the available search sites to choose from, as demonstrated in Figure 7.28.
Figure 7.28 Click the search sites that you want to query.
Choose the search engines that you want to use by clicking the check box in front of their names. To quickly toggle between all off and all on, use Turn Off/On All (Command+T) from the Edit menu. This function will also toggle highlighted items in the list between their on and off states.
Finally, enter your search text into the search field and click the magnifying glass button. Within a few seconds, the search results will be displayed. Figure 7.29 shows an Internet search for the word Java.
Figure 7.29 Each search engine is queried, and then a combined list of the results is displayed.
Depending on the type of search you're running, you might see a variety of fields in the results. The generic Internet search displays the name of the located page, the relevance, and the site it is located on. People searches, on the other hand, include phone numbers and e-mail addresses (if available). Shopping searches display the availability of a product and its cost (allowing for quick sorts based on price). Double-click any line in the search results list to open the URL in your Web browser.
To display addition information about one of the located items, select it in the search results pane. The details will be displayed at the bottom of the window. Lines highlighted in blue are hyperlinks and can be clicked to open the link in your preferred Web browser.
Customizing Channels
To organize your favorite Internet searches, you can make your own Sherlock channels. To create a new channel, choose New Channel from the Channels menu. The New Channel dialog box shown in Figure 7.30 will be displayed.
Figure 7.30 Create new channels with your favorite search engines.
To set up your channel, you must name it and provide a channel type. The channel type determines what fields will be displayed in the searches. Four channel types are available: Searching, People, Shopping, and News.
The basic Searching channel retrieves a page URL, its relevance in a search, and the name of the site. Using the People channel, you can locate individual's e-mail addresses and phone numbers. The Shopping channel includes availability and price fields for comparison shopping. Finally, News channels are like the basic Searching channels, but include a date field.
In addition to setting the channel type, you can also choose an icon for your channel by clicking the up and down arrows by the icon well. Finally, enter a description of the channel if you're afraid you won't remember what it's for.
Click OK to create the new channel. The icon chosen for the channel will be added to the top of the Sherlock window. You can drag the icon around to position it in any of the icon wells. Dragging on top of an existing channel will delete that channel (unless it is a built-in channel).
To edit or delete a channel, select its icon and then use the appropriate menu option from the Channels menu.
Adding Search Sites
What good is a channel if it doesn't have any search sites? To add existing search sites to a channel, follow these steps:
- Open a new Sherlock window (Command+N).
- Choose the channel with the existing search site you want to move or copy.
- Drag the search site's icon to the search pane of the new channel.
Chances are that you're less than thrilled with having only the option to rearrange the built-in search site plug-ins. Thankfully, Apple built Sherlock's plug-in architecture so that developers could easily create new plug-ins based on simple rules. There are hundreds of available search site plug-ins that you can download and add to your custom channels.
The Sherlock plug-in architecture relies on search Web pages to be laid out in a logical and repeating fashion. To a Web search engine, Sherlock is just another browser sending a search request. When the results are returned, Sherlock searches through them for recognizable elements.
For example, many search engines return their results in the form of a table, like this:
<TABLE> <TR><TD>Result 1</TD><TD>Description</TD></TR> <TR><TD>Result 2</TD><TD>Description</TD></TR> <TR><TD>Result 3</TD><TD>Description</TD></TR> <TR><TD>Result 4</TD><TD>Description</TD></TR> ...and so on... </TABLE>
Here, each result is displayed within a table row-one after another. The search site plug-ins take advantage of this repeating nature to identify which text in the resulting HTML belongs in the Sherlock result fields. To learn more about this process and authoring your own Sherlock plug-ins, read Apple's developer documentation at http://developer.apple.com/technotes/tn/tn1141.html.
The easiest way to find prebuilt plug-ins is to visit the Sherlock Plug-ins for Power Searchers Web site, located at http://pwsearcher.users1.50megs.com/sherlock/srccoms.html. See Chapter 8 for information on downloading and uncompressing applications and files.
A downloaded plug-in can be recognized by its .src extension. To install a plug-in, drag its icon from the Finder into the search pane of the Sherlock window. It will be immediately added to the current channel. You can also choose Add Search Site from the Channels menu, and then locate the .src file on your drive.
Sherlock continues to gain new plug-ins on a daily basis. A Google search for Sherlock plug-in yields an incredible number of results.
If you can find it on the web, there's a Sherlock plug-in to help you find it faster.
Configuration
Sherlock has a single Preferences panel, shown in Figure 7.31.
Figure 7.31 Set the number of simultaneous Web requests Sherlock can make as well as the options for indexing the drive.
There are four options you can set. These can greatly affect Sherlock's performance, so you might want to adjust the settings to suit your environment.
The first option, Maximum number of connections, determines how Sherlock uses your network. Sherlock typically performs many Web searches in parallel. The maximum number of connections is, by default, unlimited. For dial-in users, creating a large number of simultaneous connections might actually take longer than making a few connections at a time. The overhead required to manage the connections suddenly becomes a significant portion of the bandwidth. Try choosing a lower number if you are using many search engines and the results are taking a long time to return.
Next, the Automatically index items when Sherlock is opened option is used to trigger automatic indexing. When checked, Sherlock will start indexing your search volumes as soon as it is started. This can slow down overall system performance and is unnecessary unless you are performing content searches. If the Automatically index folders when they're added setting is checked, a folder that is dragged to the Files channel will be indexed immediately.
By default, Sherlock indexes a large number of languages besides English! You can speed up the indexing process by clicking the Languages button and choosing only the languages that you use.
Click OK to save the Sherlock preferences.
Advanced Configuration
When you add Sherlock search plug-ins, they're moved to an area where all users can access them. Unlike other components, this isn't in the Library folder. Instead, Sherlock stores the plug-ins inside the Sherlock application. If you're interested in getting to the plug-in source directly, you can access it through this path: /Applications/Sherlock. app/Contents/Resources/English.lproj. Similarly, the channel definitions are stored at /Applications/Sherlock.app/Contents/Resources/Channels.
In addition, the Content indexing system has a few files that you might want to take a look at. Open the folder /System/Library/Find. There are five files that control how the indexer works for English documents:
- English Stopwords— A list of common words that should not be indexed.
- English Substitutions— Common equivalent words for close matches.
- SkipFolders— A list of folders that will be skipped during indexing (includes the standard Unix directories).
- StopExts— A list of file extensions for documents that shouldn't be indexed.
- StopTypes— File types that should not be indexed (for files that have Macintosh creator/file types).
Changing any of these files is an at-your-own-risk operation, but it does offer a greater level of control over the indexing process than through the Sherlock interface.
Menus
Sherlock's menus provide access to common operations for working with files. The keyboard shortcuts can help turn Sherlock into one of the easiest ways of navigating your drive, launching applications, and opening files.
File
Use the options in the file menu to operate on URLs or files and folders that have been found, as well as perform standard window operations:
- New Window (Command+N)— Open a new Sherlock window.
- Open Item (Command+O)— Open a selected file or application.
- Open Enclosing Folder (Command+E)— Open the folder (in the Finder) that contains the selected file.
- Open in New Browser Window (Command+B)— Open the selected URL in a new Web browser window.
- Print Item (Command+P)— Open and print the selected file.
- Move to Trash (Command+Delete)— Move the selected file or folder to the trash.
- Close Window (Command+W)— Close the frontmost window.
- Show Original (Command+R)— Show the original item, if the selected file is an alias.
- Save Search Criteria (Command+S)— Save the current search so it can be repeated later.
- Open Search Criteria— Open a saved search.
Edit
The Edit menu contains the usual cut/paste tools, along with the additional Turn Off/On toggle selection (Command+T).
Find
The Find menu can be used to control Sherlock's file indexing and custom searching. One item of interest is the Find Similar Files selection, which can be used to locate files with similar qualities to a single given file.
- Add Folder— Add a folder to the available volumes for searching and indexing.
- Remove Folder— Remove the selected folder from the volume list.
- Index Now— Index the selected folder or volume.
- Stop Indexing— Stop indexing the highlighted volume.
- Delete Index— Delete the index for the highlighted volume.
- Find Similar Files— Find files with similar characteristics to the selected file.
- More Options— Display the custom search dialog.
Channels
The Sherlock Channels menu gives you the ability to customize your own channels with your favorite plug-ins. Custom channels are really useful only for users with large collections of plug-ins.
- New Channel— Create a new search channel.
- Edit Channel— Edit the selected search channel.
- Delete Channel— Remove the selected channel.
- Add Search Site— Add a search site plug-in to the current channel.
- Files (Command+F)— Switch to the Files channel.
- Internet (Command+K)— Switch to the Internet channel.
- People (Command+J)— Switch to the people channel.
- Apple— Switch to the Apple channel.
- Shopping— Switch to the Shopping channel. (This is better than QVC, by the way.)
- News— Switch to the News channel.
- Reference— Switch to the Reference channel.
- Entertainment— Switch to the Entertainment channel.
QuickTime 5 | Next Section

Account Sign In
View your cart