我到处都能看到这些数字。例如,在此页面上:http://linux.die.net/man/1/tar
tar(1)
中的数字 - 1
的含义是什么?我也见过 2、5 等。
最佳答案
它告诉您其联机帮助页属于哪个组,或者更一般地说,该项目本身属于哪个组。以下是各部分及其内容的列表:
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]
有关更多详细信息,请参阅“man”的联机帮助页。或者看看这里: http://linux.die.net/man/
有时来自不同组的项目可以具有相同的名称,这是区分它们的方法。例如,有一个 printf(1) 的联机帮助页,它是一个可执行文件,可从 shell 调用,还有一个 printf(3) 的联机帮助页,它是一个 C 语言stdio.h 中定义的函数。
使用 bash 中的 man 二进制文件,您可以通过以下方式调用不同的联机帮助页:
man printf # displays printf(1)
man 1 printf # displays printf(1)
man 3 prinft # displays printf(3)
man -a printf # displays all manpages matching printf
根据系统上安装的联机帮助页,您有时会从不同手册中获取同一项目的页面。例如,Linux 程序员手册中的 printf(3) 可能有 Posix 程序员手册中的 printf(3p) 对应内容。
关于shell - 联机帮助页标题中 shell 命令名称后面的括号中的数字有何含义?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11405225/