同名的命令怎么知道自己想找的命令对应手册的编号
来源:3-15 RTFM 阅读手册(上)

慕粉1474288341
2020-03-10
比如man 3 rand,这个3怎么知道的
1回答
-
man 命令有不同的 section(部分,区,段):
Executable programs or shell commands:可执行程序或 Shell 命令。
System calls (functions provided by the kernel):系统调用(Linux 内核提供的函数)。
Library calls (functions within program libraries):库调用(程序库中的函数)。
Special files (usually found in /dev):特殊文件(通常在 /dev 下)。
File formats and conventions, eg /etc/passwd:文件,例如 /etc/passwd。
Games:游戏。
Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7):杂项,例如 man(7), groff(7)。
System administration commands (usually only for root):系统管理命令,通常只能被 root 用户使用。
Kernel routines:内核子程序。
所以
man 3 rand
就是用于查看 Library calls (functions within program libraries):库调用(程序库中的函数)。这里的 rand 就是标准 C 语言函数库(Standard C Library)中的 rand 函数,用于生成伪随机数。
10
相似问题
回答 1
回答 1