Книга: 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 man
— whatis
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.
- Printing the Contents of a File with cat
- Changing Directories with cd
- Changing File Access Permissions with chmod
- Copying Files with cp
- Printing Disk Use with du
- Finding Files by Searching with find
- Searches for a String in Input with grep
- Paging Through Output with less
- Creating Links Between Files with ln
- Finding Files from an Index with locate
- Listing Files in the Current Directory with ls
- Reading Manual Pages with man
- Making Directories with mkdir
- Moving Files with mv
- Listing Processes with ps
- Deleting Files and Directories with rm
- Printing the Last Lines of a File with tail
- Printing Resource Usage with top
- Printing the Location of a Command with which
- Reading Documentation
- Using Man Pages
- Basic Commands
- Moving Files with mv
- Printing the Location of a Command with which
- OS Design Property Pages
- Appendix A. Detailed explanations of special commands
- Using Double Quotes to Resolve Variables in Strings with Embedded Spaces
- Mangle table
- Drawbacks with restore
- Basics of the iptables command
- Commands