例如我要查询C语言的open函数,shell下man open
给出的解释是openvt - start a program on a new virtual terminal (VT) …,不是我想要看的open函数啊!
解决办法: man -a open,先输出上述的信息,q结束后,输出C语言的open信息。还有个简洁的方法,man 2 open,这个2怎么来的?apropos命令查询
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]
1可执行程序或 shell 命令
2系统调用 (内核提供的功能)
3库调用 (程序库中的函数)
4特殊文件 (通常在/dev 中找到)
5文件格式和约定, 如
6游戏
7杂项 (包括宏包和
例如 man(7)、groff(7)
8系统管理命令 (通常仅适用于根)
9内核例程 [非标准]
open (1) - start a program on a new virtual terminal …
open (2) - open and possibly create a file or device
打开 (1)-在新的虚拟终端上启动程序…。
打开 (2)-打开并可能创建文件或设备