到达正确的手册页

Reaching correct man page

当我在 shell 提示符下键入 'man read' 时,它会显示读取 shell 命令,如何打开 read() C 函数的文档。 我的问题不仅仅是 read 适用于类似的其他功能,如 sleep()

我通常 运行 https://linux.die.net 当它发生时并参考那里的文档,我相信会有办法从 shell 提示本身

man <section #> <page>

来自 man 手册页:

   The table below shows the section numbers of the manual followed by the types of pages they contain.

   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 conventions), e.g. man(7), groff(7)
   8   System administration commands (usually only for root)
   9   Kernel routines [Non standard]

要查找给定页面存在哪些部分,您可以使用 -k 标志:

$ man -k ^sleep$
sleep (1)            - delay for a specified amount of time
sleep (3)            - sleep for a specified number of seconds