同名的命令怎么知道自己想找的命令对应手册的编号

来源:3-15 RTFM 阅读手册(上)

慕粉1474288341

2020-03-10

比如man 3 rand,这个3怎么知道的

写回答

1回答

Oscar

2020-03-12

man 命令有不同的 section(部分,区,段):

  1. Executable programs or shell commands:可执行程序或 Shell 命令。

  2. System calls (functions provided by the kernel):系统调用(Linux 内核提供的函数)。

  3. Library calls (functions within program libraries):库调用(程序库中的函数)。

  4. Special files (usually found in /dev):特殊文件(通常在 /dev 下)。

  5. File formats and conventions, eg /etc/passwd:文件,例如 /etc/passwd。

  6. Games:游戏。

  7. Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7):杂项,例如 man(7), groff(7)。

  8. System administration commands (usually only for root):系统管理命令,通常只能被 root 用户使用。

  9. Kernel routines:内核子程序。


所以 

man 3 rand

就是用于查看 Library calls (functions within program libraries):库调用(程序库中的函数)。这里的 rand 就是标准 C 语言函数库(Standard C Library)中的 rand 函数,用于生成伪随机数。

1
0

Linux核心技能与应用

一网打尽Linux必备核心技能,面试、升职必备的“敲门砖”。

2091 学习 · 692 问题

查看课程