Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1064148
  • 博文数量: 573
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 66
  • 用 户 组: 普通用户
  • 注册时间: 2016-06-28 16:21
文章分类

全部博文(573)

文章存档

2018年(3)

2016年(48)

2015年(522)

分类: LINUX

2015-12-07 16:04:36

Linux man page各编号含义


       在linux中,我们经常需要通过man命令来查询某个API或者命令的用法及含义,不知道大家有没有注意到当你要查的命令/API有多个man pages对应时,比如下图:

[plain] view plaincopy
  1. linux-jzzp:~ # man mkdir  
  2. Man: find all matching manual pages (set MAN_POSIXLY_CORRECT to avoid this)  
  3.  * mkdir (1)  
  4.    mkdir (2)  
  5.    mkdir (1p)  
  6.    mkdir (3p)  
  7. Man: What manual page do you want?  
那么mkdir后面的编号是什么意思呢?


答案就是类别编号。因为linux中有一些名字既可以是cmd又是API,而相应的manpage又不一样,为了区分不同的manpage,linux系统中所有涉及manpage的内容分为几类,每一类对应一个编号(如上面mkdir后面的数字)。

主要的类别和对应的编号有:


[plain] view plaincopy
  1. 0     Header files  
  2. 0p    Header files (POSIX)  
  3. 1     Executable programs or shell commands  
  4. 1p    Executable programs or shell commands (POSIX)  
  5. 2     System calls (functions provided by the kernel)  
  6. 3     Library calls (functions within program libraries)  
  7. 3n    Network Functions  
  8. 3p    Perl Modules  
  9. 4     Special files (usually found in /dev)  
  10. 5     File formats and conventions eg /etc/passwd  
  11. 6     Games  
  12. 7     Miscellaneous  (including  macro  packages and conventions), e.g. man(7), groff(7)  
  13. 8     System administration commands (usually only for root)  
  14. 9     Kernel routines  
  15. l     Local documentation  
  16. n     New manpages  
阅读(944) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~