为什么 Unix 应用程序用 man 括号中的数字记录?

Eri*_*ick 6 linux unix man

当我尝试获取有关 Unix 命令的帮助时,我得到了 saytar(1)lsof(8).

为什么括号内有一个数字,它到底指的是什么?

Sve*_*ven 20

该手册分为几章,有些主题实际上记录了两次,这通常是当有一个 C 库函数或系统调用也可以作为用户空间命令或与配置文件同名的配置文件时出现这种情况命令它记录(例如:chown是一个用户空间命令和一个系统调用,您可以chown在第 1 和第 2 节中找到)。然后使用该编号选择适当的章节:

man 1 ls
Run Code Online (Sandbox Code Playgroud)
  • 第 1 部分:用户命令
  • 第 2 部分:系统调用
  • 第 3 节:库函数
  • 第 4 部分:特殊文件
  • 第 5 部分:文件格式
  • 第 6 部分:游戏
  • 第 7 节:公约和杂项
  • 第 8 部分:管理和特权命令
  • L 部分:数学库函数
  • N 部分:tcl 函数


小智 5

是的,SvW 说的。您可以通过键入以下内容从 man 本身获取完整文档:

$ man 1 man

   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]
Run Code Online (Sandbox Code Playgroud)