2012-10-09 45 views
2

某些C函數的名稱與Ubuntu命令不一致,例如:getopt。我如何查看這些功能的手冊頁?毫無疑問,它很容易在互聯網上獲得,但我非常希望儘可能不離開終端。Ubuntu手冊頁模糊

+1

$ man 3 getopt,? – Morpfh

回答

4

使用格式man [section] name(例如, man 3 getopt)其中可以是以下之一:

1  User Commands 
    2  System Calls 
    3  C Library Functions 
    4  Devices and Special Files 
    5  File Formats and Conventions 
    6  Games et. Al. 
    7  Miscellanea 
    8  System Administration tools and Deamons 

有關詳情,請man man

1

man 3 getopt給出c函數信息。
其中,作爲man 1 getoptman getopt給出命令信息。

頁面傳統上使用符號「name(section)」表示:例如,ftp(1)。當系統調用,用戶命令或宏程序包的名稱一致時,相同的頁面名稱可能會出現在手冊的多個部分中。

2

man 3 getopt顯示C getopt的聯機幫助頁。

看到man man

1

man -wa getopt給你手冊頁的getopt名單:在我的系統,它是:

/usr/share/man/man1/getopt.1.bz2 
/usr/share/man/man3/getopt.3.bz2 
/usr/share/man/man3p/getopt.3p.bz2 

,或者,man -f getopt

getopt    (1) - parse command options (enhanced) 
getopt    (3) - Parse command-line options 
getopt []   (1) - parse command options (enhanced) 
getopt []   (3) - Parse command-line options 
getopt []   (3p) - command option parsing 

你可以然後使用文件名中的數字(在第一個輸出中)或括號(在第二個輸出中):例如,man 1 getoptman 3 getopt

1

$ man 3 getopt其中3是截面。

$ man man

作爲Sections.狀態:

手動通常分成8個編號節,安排如下(在BSD,Unix和Linux):

Section  Description 
1.   General commands 
2.   System calls 
3.   Library functions, covering in particular the C standard library 
4.   Special files (usually devices, those found in /dev) and drivers 
5.   File formats and conventions 
6.   Games and screensavers 
7.   Miscellanea 
8.   System administration commands and daemons 

的Unix系統V使用類似的編號方案,除了不同的順序:

Section  Description 
1.   General commands 
1M.  System administration commands and daemons 
2.   System calls 
3.   C library functions 
4.   File formats and conventions 
5.   Miscellanea 
6.   Games and screensavers 
7.   Special files (usually devices, those found in /dev) and drivers