Datasheet

Book VIII
Chapter 1
. . . And UNIX
Lurks Beneath
651
Useful Commands
Opening documents and launching applications
Launching applications and opening documents is child’s play for a UNIX
pro like you. The open command does it all. For example, to bring the Finder
to the foreground without touching the mouse, use
open /System/Library/CoreServices/Finder.app
To open a document from the command line, follow a similar scheme.
For example, to view an image named myImage.tif that’s stored in your
Documents folder using Preview, try this:
open ~/Documents/myImage.tif
Useful Commands
Manipulating files and viewing folder content is fun, but the command line is
capable of so much more! Now I focus your attention on some of the other
useful tasks that you can perform with the command line.
Mac OS X comes stocked with a full set of useful commands. You can
discover what commands are installed by viewing the files in /usr/bin.
Type cd /usr/bin to navigate there.
Calendar
One of my favorite command-line functions is the cal command, which
displays a calendar in text form. Simply entering cal at the prompt displays a
calendar for the current month, as shown in Figure 1-4.
Figure 1-4:
Type cal
to view a
calendar for
the current
month.
54_435410-bk08ch01.indd 65154_435410-bk08ch01.indd 651 8/6/09 12:44:59 AM8/6/09 12:44:59 AM