7

可能重复:
为什么类 Unix 环境中的程序名称后有数字?

(1) 是什么意思?

4

4 回答 4

14

这是其man页面所在的手册部分。来自man 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 conven-
       tions), e.g. man(7), groff(7)
   8   System administration commands (usually only for root)
   9   Kernel routines [Non standard]
于 2009-06-07T18:31:22.570 回答
7

之前提交的所有答案都是正确的 - (1) 指的是在线手册页的部分。但是您的下一个问题也可能是:为什么要参考手册部分?

答案是相同的词或命令可能出现在不同的部分。例如,“passwd”既指更改密码的命令,也指文件 /etc/passwd。因此,如果您在谈论前者,则应编写passwd(1),而在谈论后者时,应编写passwd(5)

man命令有一种方法可以强制它使用特定的部分,而不是从头到尾搜索。在我的 Unix 系统(Mac)上,只需键入man passwd即可调出第 1 节的条目。要显示第 5 节的条目,请使用

man 5 passwd
于 2009-06-07T19:09:21.293 回答
4
       1    General commands (tools and utilities).
       2    System calls and error numbers.
       3    Libraries.
       3p   perl(1) programmer's reference guide.
       4    Device drivers.
       5    File formats.
       6    Games.
       7    Miscellaneous.
       8    System maintenance and operation commands.
       9    Kernel internals.

来自任何合理的 unix 系统上的“man man”。

于 2009-06-07T18:34:11.210 回答
1

它指的是手册部分-

1 一般命令
2 系统调用
3 C 库函数
4 特殊文件(通常是设备,位于 /dev 中的那些)和驱动程序
5 文件格式和约定
6 游戏和屏保
7 杂项
8 系统管理命令和守护进程
于 2009-06-07T18:33:32.397 回答