duc*_*lip 470 unix linux command-line manpage
例如:man(1),find(3),updatedb(2)?括号中的数字(英文"括号")是什么意思?
Ian*_*n G 448
这是分配命令的手册页的部分.
这些被拆分为
可以在Unix程序员手册(第ii页)中查看每个部分的原始描述.
Vin*_*vic 75
该命令的部分记录在手册中.部分列表记录在人工手册中.例如:
man 1 man
man 3 find
Run Code Online (Sandbox Code Playgroud)
当在不同部分上存在类似或完全相同的命令时,这非常有用
Gab*_*les 19
正如@Ian G 所说,它们是手册页部分。不过,让我们更进一步:
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.
Run Code Online (Sandbox Code Playgroud)
man <section_num> <cmd>假设您正在 Google 上搜索 Linux 命令。您可以OPEN(2)在线找到pg:http : //man7.org/linux/man-pages/man2/open.2.html。
要在您电脑的手册页中看到这一点,只需输入man 2 open.
用于FOPEN(3)使用man 3 fopen等。
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查看第 3 部分的介绍。继续此过程直到完成。每次点击 后q,它都会带您回到主终端屏幕,但您仍将处于交互式提示中,您将看到以下行:
--Man-- next: intro(8) [ view (return) | skip (Ctrl-D) | quit (Ctrl-C) ]
Run Code Online (Sandbox Code Playgroud)
请注意,man -a intro将带您完成的部分顺序是:
这个搜索顺序是有意的,正如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)
Run Code Online (Sandbox Code Playgroud)
他们为什么选择这个顺序?我不知道(如果你知道,请在评论中回答),但只是意识到这个顺序是正确和有意的。
它指示命令所在的手册页部分.man命令的-s开关可用于限制搜索某些部分.
查看手册页时,左上角会显示该节的名称,例如:
用户命令printf(1)
标准C库函数printf(3C)
因此,如果您正在尝试查找C函数并且不想意外地看到共享相同名称的用户命令的页面,那么您将执行'man -s 3C ...'