首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >git手册部分是什么意思?

git手册部分是什么意思?
EN

Stack Overflow用户
提问于 2014-03-17 14:47:36
回答 2查看 37关注 0票数 2

当正在讨论的命令是"git commit“或"git add”时,git手册使用“git提交(1)”或"git-add(1)“之类的页面标题。

在所有这些标题中,"(1)“是什么意思?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2014-03-17 14:55:17

Unix手册页(您使用man命令访问的内容)名义上分为不同的部分。您可以运行man man来查看标准的部分列表,这些部分如下所示:

代码语言:javascript
运行
复制
   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部分显式化。比较:

代码语言:javascript
运行
复制
man reboot

通过以下方式:

代码语言:javascript
运行
复制
man 2 reboot
票数 2
EN

Stack Overflow用户

发布于 2014-03-17 14:59:21

Unix手册页分为几个部分,以便区分名称。例如,有一个名为printf的shell命令和一个同名的C函数。

如果您查看维基百科,您将看到用于Linux的以下部分编号:

代码语言:javascript
运行
复制
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),以便清楚。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22457443

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档