Getting the Most from Common Commands
In this section, we consider advanced and administrative uses of familiar Unix commands.
Getting Help
The manual page facility is the quintessentially Unix approach to online help: superficially minimalist, often obscure, but mostly complete. It’s also easy to use, once you know your way around it.
Undoubtedly, the basics of the man command are familiar: getting help for a command,
specifying a specific section, using -k (or apropos) to search for entries for a
specific topic, and so on.
There are a couple of man
features that I didn’t discover until I’d been working on Unix systems
for years (I’d obviously never bothered to run man man). The first is that you can request
multiple manual pages within a single man command:
$ man umount fsck newfsman presents the pages as
separate files to the display program, and you can move among them
using its normal method (for example, with :n in more).
On FreeBSD, Linux, and Solaris systems, man also has a -a option, which retrieves the specified
manual page(s) from every section of the manual. For example, the
first command below displays the introductory manual page for every
section for which one is available, and the second command displays
the manual pages for both the chown
command and system call:
$man -a intro$man -a chown
Manual pages are generally located in a predictable location
within the filesystem, often /usr/share/man. You can configure the
man command to search multiple
man directory trees ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access