When I try to get help on a Unix command, I get reference to say tar(1)
or lsof(8)
.
Why is there a number within parenthesis and what does it refer to exactly ?
When I try to get help on a Unix command, I get reference to say tar(1)
or lsof(8)
.
Why is there a number within parenthesis and what does it refer to exactly ?
The manual is divided into chapters and some topics are actually documented twice, which is often the case when there is a C library function or system call that is also available as a user space command or a config file is available with the same name as the command it documents (example: chown
is a user space command and a system call and you find chown
in section 1 and 2). The number is then used to select the appropriate chapter:
man 1 ls
Yep, what SvW said. You can get the full doc from man itself by typing:
$ man 1 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 conven-
tions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]