2014-03-07 42 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頁面。