E.g man(1), find(3), updatedb(2) ? what do these numbers mean ?
-
The section the command is documented in the manual. The list of sections is documented on man's manual. For example:
man 1 man man 3 findThis is useful for when similar or exactly equal commands exist on different sections
Darron : And in the "olden days" the section numbers corresponded to the binder that the hardcopy version of the man page was in. -
It's the section that the man page for the command is assigned to.
These are split as
- General commands
- System calls
- C library functions
- Special files (usually devices, those found in /dev) and drivers
- File formats and conventions
- Games and screensavers
- Miscellanea
- System administration commands and daemons
-
It indicates the section of the man pages the command is found in. The -s switch on the man command can be used to limit a search to certain sections.
When you view a man page, the top left gives the name of the section, e.g.:
User Commands printf(1)
Standard C Library Functions printf(3C)So if you are trying to look up C functions and don't want to accidentally see a page for a user command that shares the same name, you would do 'man -s 3C ...'
-
Note also that on other unixes, the method of specifying the section differs. On solaris, for example, it is:
man -s 1 man -
The reason why the section numbers are significant is that many years ago when disk space was more of an issue than it is now the sections could be installed individually.
Many systems only had 1 and 8 installed for instance. These days people tend to look the commands up on google instead.
-
Here is a rather complete listing of section numbers...
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.