Now that you’re almost to the end of this guide, let’s look at some ways to continue learning about the Unix side of Mac OS X. Documentation is an obvious choice, but it isn’t always in obvious places. You can save time by taking advantage of other shell features — aliases, functions, and scripts — that let you shorten a repetitive job and “let the computer do the dirty work.”
We’ll close by seeing how you can use Unix commands on non-Unix systems.
You might want to know the options to the programs we’ve introduced and get more information about them and the many other Unix programs. You’re now ready to consult your system’s documentation and other resources.
Different
versions of Unix have adapted Unix
documentation in different ways. Almost all Unix systems have
documentation derived from a manual originally called the
Unix Programmer’s
Manual
. The manual has numbered sections;
each section is a collection of manual pages, often called manpages;
each program has its own manpage. Section 1 has manpages for general
Unix programs such as who
and
ls
.
Mac OS X has individual manpages stored on the computer; users can
read them online. If you want to know the correct syntax for entering
a command or the particular features of a program, enter the command
man
and the name of the command. The syntax is:
man command
For example, if you want to find information about the program
vi
, which allows you to edit files, enter:
% man vi
.
.
%
The output of man
is filtered through a pager in
Mac OS X like less
or more
automatically.
After you enter the command, the screen fills with text. Press the
spacebar or Return to read more, and q
to quit.
Mac
OS X also includes a command called
apropos
or man
-k
to help you locate a
command if you have an idea of what it does but are not sure of its
correct name. Enter apropos
followed by a
descriptive word; you’ll get a list of commands that
might help. To get this working, however, you need to first build the
apropos database. This is done when Mac OS X runs its weekly
maintenance job, which can be run manually with the following
command:
% sudo periodic weekly
Password:
%
Now you can use apropos
to find all commands
related to PostScript, for example, with:
% man -k postscript
enscript(1) - convert text files to PostScript
grops(1) - PostScript driver for groff
pfbtops(1) - translate a PostScript font in .pfb format to ASCII
Some commands — cd
and
jobs
, for example — aren’t
separate Unix programs; they’re part of the shell.
On Mac OS X, you’ll find documentation for those
commands in the manual page for tcsh.
If the program isn’t a standard part of your Unix
system — that is, your system staff added the program to your
system — there may not be a manual page, or you may have to
configure the man
program to find the local
manpage files. The third possibility is that you
don’t have all the manpage directories in your
MANPATH
variable. If so, add the following to
your .tcshrc
(see Section 3.3),
then open a new Terminal window for the settings to take effect:
% setenv MANPATH /sw/share/man:/sw/man:${MANPATH}:/usr/X11R6/man
The Internet changes so quickly that any list of online Unix documentation we’d give you would soon be out of date. Still, the Internet is a great place to find out about Unix systems. Remember that there are many different versions of Unix, so some documentation you find may not be completely right for you. Also, some information you’ll find may be far too technical for your needs (many computer professionals use and discuss Unix). But don’t be discouraged! Once you’ve found a site with the general kind of information you need, you can probably come back later for more.
The premier place to start your exploration of online documentation for Mac OS X Unix is the Apple web site. But don’t start on their home page. Start either on their Mac OS X page (http://www.apple.com/macosx/) or their Darwin project home page (http://developer.apple.com/darwin/). Another excellent place to get information about software downloads and add-ons to your Unix world is the Fink project (see Section 8.1).
Many Unix command names are plain English words, which can make
searching hard. If you’re looking for collections of
Unix information, try searching for the Unix program named
grep
. One especially Unix-friendly search engine
is Google, at
http://www.google.com. Google
offers a specialized Macintosh search engine at http://www.google.com/mac and a BSD search
engine at http://www.google.com/bsd (which is useful
because Mac OS X’s Unix personality derives from its
BSD heritage).
Here are some other places to try:
Some print and online magazines have Unix tutorials and links to more information. Macintosh magazines include MacTech (http://www.mactech.com), MacWorld (http://www.macworld.com), and MacAddict (http://www.macaddict.com).
Those such as O’Reilly & Associates, Inc. (http://www.oreilly.com), have areas of their web sites that feature Unix and have articles written by their books’ authors. They may also have books online (such as the O’Reilly Safari service) available for a small monthly fee — which is a good way to learn a lot quickly without needing to buy a paper copy of a huge book, most of which you might not need.
Many schools use Unix-like systems and will have online documentation. You’ll probably have better luck at the Computer Services division (which services the whole campus) than at the Computer Science department (which may be more technical).
Many Mac OS X web sites are worthy of note, though they’re run by third parties and may change by the time you read this. Mac OS X Apps (http://www.macosxapps.com) offers a wide variety of Aqua applications. Information on Darwin can be found at Open Darwin (http://www.opendarwin.org), and Mac OS X Hints (http://www.macosxhints.com) offers valuable information and hints. One more site well worth a bookmark is O’Reilly’s MacDevCenter (http://www.macdevcenter.com/).
Apple User Groups are an excellent source of information, inspiration, and camaraderie. To find an Apple User Group near you, see http://www.apple.com/usergroups/.
Bookstores, both traditional and online, are full of computer books. The books are written for a wide variety of needs and backgrounds. Unfortunately, many books are rushed to press, written by authors with minimal Unix experience, full of errors. Before you buy a book, read through parts of it. Does the style (brief or lots of detail, chatty and friendly or organized as a reference) fit your needs? Search the Internet for reviews; online bookstores may have readers’ comments on file.
18.222.71.231