当正在讨论的命令是"git commit“或"git add”时,git手册使用“git提交(1)”或"git-add(1)“之类的页面标题。
在所有这些标题中,"(1)“是什么意思?
发布于 2014-03-17 14:55:17
Unix手册页(您使用man命令访问的内容)名义上分为不同的部分。您可以运行man 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 conventions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]所有git命令都属于第1节(“可执行程序或shell命令”),传统的表示方法是在名称后面的括号中使用节号。因此,如果有人说,请参阅ls(1),意思是“查看ls的第1节手册页”。
有时,在不同的部分中会有相同名称的命令。在这种情况下,您可以使man部分显式化。比较:
man reboot通过以下方式:
man 2 reboot发布于 2014-03-17 14:59:21
Unix手册页分为几个部分,以便区分名称。例如,有一个名为printf的shell命令和一个同名的C函数。
如果您查看维基百科,您将看到用于Linux的以下部分编号:
1 General commands
2 System calls
3 Library functions, covering in particular the C standard library
4 Special files (usually devices, those found in /dev) and drivers
5 File formats and conventions
6 Games and screensavers
7 Miscellanea
8 System administration commands and daemons例如,ls在第1节,open在第2节,fopen在第3节,通常它们被写成ls(1),open(2)和fopen(3),以便清楚。
https://stackoverflow.com/questions/22457443
复制相似问题