Getting Help
If you need more information than this book provides, there are several things you can do.
- Run the
man
command The
man
command displays an online manual page, or manpage, for a given program. For example, to learn about listing files withls
, run:➜
man ls
To search for manpages by keyword for a particular topic, use the
-k
option followed by the keyword:➜
man -k database
- Run the
info
command The
info
command is a text-based, menu-driven help system covering some important Terminal commands and applications:➜
info ls
While
info
is running, some useful keystrokes are:To get help, type
h
To quit, type
q
To page forward and backward, use the space bar and Backspace keys
To jump between hyperlinks, press Tab
To follow a hyperlink, press Enter
If
info
has no documentation on a given program, it displays the program’s manpage. For a listing of available documentation, typeinfo
by itself. To learn how to navigate the info system, typeinfo info
.- Use the
--help
option (if any) Some commands respond to the option
--help
by printing a short help message. Try:➜
diff --help
If the output is longer than the screen, pipe it into the
less
program to display it in pages (pressq
to quit):➜
diff --help | less
- Examine the directory /usr/share/doc
This directory contains supporting documents for several programs. For example, files for the bash shell are found in /usr/share/doc/bash.
- Mac-specific websites
Some great sites for asking OS X questions are Mac OS X Hints (http://hintsforums.macworld.com/) and ...
Get Macintosh Terminal Pocket Guide 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.