Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
226 Chapter10·MacSSH N ote Mac OS X comes bundled with a multitude of familiar command line tools you can use within an SSH session. These tools include curl, grep, gzip, lpr, lpq, nc, openssl, rsync, tar, vi, and zip among hundreds of others. To keep this section short and on topic, only OS X-specific commands will be covered here. Information about these other tools can be found easily online and via the built-in manual pages. Using Spotlight Max OS X version 10.4 introduced Spotlight, a powerful desktop search capability that dramatically simplifies and speeds up the task of finding a specific piece of content in the sea of documents that are on our computers. Spotlight is typically used by clicking on the magnifying glass icon on the Menu Bar, or by pressing Command-Space. The mdfind utility can be used to accomplish the same task via the command line. Searching for Documents that Include the Words SSH, Mac, and Book ank:~ max$ mdfind "ssh mac book" /Users/max/Documents/ssh/ch10au.doc Searching for Documents with the Word fish or the Word Chips ank:~ max$ mdfind "(fish_chips)" The mdfind tool supports specifying more complex queries via the command line. Consult its manual page to learn more about all its arguments. t ip The mdfind tool, as well as all the other tools discussed in this section, often have additional knobs and switches accessible via command line arguments that allow you to tailor its operation to your needs. To learn more about a tool's arguments, consult the tool's man page using the man. For example, to open the man page for mdfind, type the following command in the Terminal: man mdfind