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 newfs
man
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 ...
Get Essential System Administration, 3rd Edition 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.