Appendix A. Answers to Exercises
Exercise 1 Solution
The first two apropos
commands return far too much information to be useful. The third command, apropos "copy file"
returns a reasonable amount of information.
Macintosh:~ sample$ apropos "copy file" CpMac(1), /usr/bin/CpMac(1) - copy files preserving metadata and forks File::Copy(3pm) - Copy files or filehandles cp(1) - copy files cpio(1) - copy files to and from archives
From this result, you might surmise that CpMac, cp
, or cpio
would be an appropriate tool for copying files. Of course, the manual entry for each command provides more helpful information.
Exercise 2 Solution
The command man -k "copy file"
is equivalent to apropos "copy file"
and yields the same results as Exercise 1.
Exercise 1 Solution
Use the following steps to collect the sample:
Launch
/Developer/Applications/Instruments
. The program starts and displays a list of available templates.Choose the Time Profiler template. Instruments configures your document with the Time Profiler instrument.
Click the Record button in the toolbar. This brings up an open panel where you can specify which program you want to start along with other options.
Select
/Applications/Stickies
in the Open panel and click the Choose button. The Stickies application appears in the Dock, and the Dock's windows appear behind the Instruments application.Switch to Stickies and use the application. Type some notes, change the color a few times, and do the usual things you do with Stickies. ...
Get Beginning, Mac OS® X Snow Leopard™ Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.