例如查wait这个号召,
[root@jcwkyl /]# man -k wait
局部输出如下:
wait (1p) - await process completion
wait (2) - wait for process to change state
wait (3p) - wait for a child process to stop or terminate
wait3 [wait4] (2) - wait for process to change state, BSD
style
wait4 (2) - wait for process to change state, BSD style
wait [builtins] (1) - bash built-in commands, see bash(1)
waitid (3p) - wait for a child process to change state
waitpid [wait] (2) - wait for process to change state
waitpid [wait] (3p) - wait for a child process to stop or
terminate
上述号召man –k雷同于apropos号召。会看到输出的白领丽人第行分三局部,最其中的局部就表示这个号召在哪一类。例如:
wait (2) - wait for process to change state
就表示这个一个体系调用。因为分类2是系统调用的分类。
man文档分为9大类(来自tldp.org/HOWTO/Man-Page/q2http://www.theji9.info/gongsi/641.html.html):
Section The human readable name
1 User commands that may be started by everyone.
2 System callshttp://www.ji9online.info/jiaru/564.html, that is,
functions provided by the kernel.
3 Subroutines, that is, library functions.
4 Devices, that is, special files in the /dev directory.
5 File format descriptions, e.g. /etc/passwd.
6 Games, immolation-explanatory.
7 Miscellaneous, e.g. macro packages, conventions.
8 System administration tools that only root can execute.
9 Another (Linux specific) place for kernel routine
documentation.
n (Deprecated) New documentation, that may be moved to a more
appropriate section.
o (Deprecated) Old documentation, that may be kept for a grace
period.
l (Deprecated) Local documentation referring to this particular
system.
打听这些,在看一个号召的man文档的see
also局部时就能猜到这个号召可能是哪一类的,是一个bash号召,还是一个体系调用,还是其它,等等,心里会有个数。
man.linuxmanpages.com/ 这是man
的在线文档,它将man文档分为8个大类,并且能够得体地点击分类的链接来察看这个分类下面有哪些号召。
曾经自己在linux下写一个socket过程,因为记不太打听sockaddr_in数据构造的定义,然而又man不到,最后在linuxforum论坛上找到了答案:该当用man
7 ip来看。
即便一个大广度的问题,这时,作为一种组织措施,“面向对象”不能帮我们些什么吗?