2014-03-07 39 views

回答

2

UNIX命令手册页分为几部分。请参阅章节说明here

通用命令行命令位于第1部分。当您键入man command时,man会在第一个找到它的部分为您提供command的手册页。

但是,某些命令可能存在于多个部分中。所以如果你有一个shell命令read并且你输入了man read,你会得到第1部分的定义。但是如果你想让图书馆电话read,你应该输入man 3 read这将告知man专门去第3部分。

1

您可以在不同部分具有相同名称的手册页。例如,

man 1 printf 

会给你的printf命令的手册,而

man 3 printf 

会给你的C库例程printf手册。如果您未指定节号,则会从包含匹配的第一节中获取命令。

0

如果您提供man的编号,则说明它正好查看相关命令的手册的一个部分。 (具体地讲这是指在寻找的man文件的特定目录)。如它在manman page说:

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 sections, following a pre-defined 
order and to show only the first page found, even if page exists in several sections. 

第3章,在Linux中,通常保留用于文库内的功能,例如C/C++库碰巧有man页面。