分类:
2008-11-12 11:16:27
To read a manual page for a Unix command, one can use
man
at a prompt; for example, "man ftp". In order to simplify paging through the output man generally uses the file viewer.
Pages are traditionally referred to using the notation "name(section)"; for example,
. The same page name may appear in more than one section of the manual, this can occur when the names of , user , or conflict. Two examples are and , or and . The syntax for accessing the non-default manual section varies between different man implementations. On Linux and *BSD, for example, the syntax for reading isman 3 printf
那么,默认的一些sectin对应的编号和内容: 所以要想查一些C接口,可以用man 3
The manual is generally split into eight numbered sections, organized as follows (on Unix and ):
Section | Description |
---|---|
1 | General |
2 | |
3 | functions |
4 | (usually devices, those found in /dev) and |
5 | and conventions |
6 | and |
7 | Miscellanea |
8 | System administration and |
Unix uses a similar numbering scheme, except section 4 is file formats, section 5 is miscellany and section 7 is special files.
On some systems some of the following sections are available:
Section | Description |
---|---|
0 | |
9 | routines |
n | / keywords |
x | The |
The sections are further subdivided by means of a suffix letter, such that section 3C is for C library calls, 3M is for the math library, and so on. A consequence of this is that section 8 (system administration commands) is sometimes relegated to the 1M subsection of the main commands section. Some subsection suffixes have a general meaning across sections:
Subsection | Description |
---|---|
p | specifications |
x | documentation |
Some versions of man cache the formatted versions of the last several pages viewed.
To see options you can use with command man, enter the command man man.
All man pages follow a common layout that is optimized for presentation on a simple text display, possibly without any form of highlighting or font control. Sections present may include:
Other sections may be present, but these are not well standardized across man pages. Common examples include: OPTIONS, EXIT STATUS, ENVIRONMENT, KNOWN BUGS, FILES, AUTHOR, REPORTING BUGS, HISTORY and COPYRIGHT.