作为@Ian G says,它们是手册页部分。让我们更进一步:
1。请参阅带有man man 的man 命令的手册页,它显示了9 个部分,如下所示:
DESCRIPTION
man is the system's manual pager. Each page argument given
to man is normally the name of a program, utility or func‐
tion. The manual page associated with each of these argu‐
ments is then found and displayed. A section, if provided,
will direct man to look only in that section of the manual.
The default action is to search in all of the available sec‐
tions following a pre-defined order ("1 n l 8 3 2 3posix 3pm
3perl 5 4 9 6 7" by default, unless overridden by the SEC‐
TION directive in /etc/manpath.config), and to show only the
first page found, even if page exists in several sections.
The table below shows the section numbers of the manual fol‐
lowed by the types of pages they contain.
1 Executable programs or shell commands
2 System calls (functions provided by the kernel)
3 Library calls (functions within program libraries)
4 Special files (usually found in /dev)
5 File formats and conventions eg /etc/passwd
6 Games
7 Miscellaneous (including macro packages and conven‐
tions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]
A manual page consists of several sections.
2。 man <section_num> <cmd>
假设您正在谷歌搜索 Linux 命令。你可以在网上找到OPEN(2) pg:open(2) — Linux manual page。
要在您电脑的手册页中查看此内容,只需输入man 2 open。
对于FOPEN(3),使用man 3 fopen等
3。 man <section_num> intro
要阅读某个部分的介绍页面,请输入man <section_num> intro,例如man 1 intro、man 2 intro、man 7 intro等。
要连续查看所有手册页介绍,一个接一个,执行man -a intro。第 1 部分的介绍页面将打开。按 q 退出,然后按 Enter 查看第 8 节的介绍。按 q 退出,然后按 Enter kbd> 查看第 3 节的介绍。继续此过程直到完成。每次点击 q 后,它都会带您回到主终端屏幕,但您仍会处于交互式提示中,您会看到以下行:
--Man-- next: intro(8) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
请注意,man -a intro 将带您完成的部分顺序是:
- 第 1 节
- 第 8 节
- 第 3 节
- 第 2 节
- 第 5 节
- 第 4 节
- 第 6 节
- 第 7 节
这个搜索顺序是有意的,正如man man 页面所解释的那样:
The default action is to search in all of the available sections follow‐
ing a pre-defined order ("1 n l 8 3 2 3posix 3pm 3perl 5 4 9 6 7" by default, unless overrid‐
den by the SECTION directive in /etc/manpath.config)
他们为什么选择这个订单?我不知道(如果你知道,请在 cmets 中回答),但请意识到这个顺序是正确且有意的。
相关:
- Google search for "linux what does the number mean in parenthesis after a function?"
- SuperUser: What do the parentheses and number after a Unix command or C function mean?
- Unix & Linux: What do the numbers in a man page mean?