Книга: Fedora™ Unleashed, 2008 edition

Reading Manual Pages with man

Reading Manual Pages with man

Time for a much-needed mental break: The man command is easy to use. Most people use only the topic argument, like this: man gcc. However, two other commands that are very useful work closely with manwhatis and apropos.

The whatis command returns a one-line description of another command, which is the same text you get at the top of that command's man page. For example:

[paul@caitlin ~]$ whatis ls
ls (1) - list directory contents

The output there explains what ls does but also provides the man page section number for the command so that you can query it further.

On the other hand, the apropos command takes a search string as its parameter and returns all man pages that match the search. For example, apropos mixer gives this list:

alsamixer (1) - soundcard mixer for ALSA soundcard driver
mixer (1) - command-line mixer for ALSA soundcard driver
aumix (1) - adjust audio mixer

So, use apropos to help you find commands and use whatis to tell you what a command does.

Оглавление книги


Генерация: 1.081. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз