Just saw someone referencing man 7 regex
on Stackoverflow. I tried man regex
and got very similar output – there appear to be slight differences.
So what is this magical number 7? Searching man 7 unix
on Google gives me more mysterious results like UNIX(7)…
Best Answer
About
UNIX(7)
To answer your question of "UNIX(7)", this is standard convention of saying "The man page for UNIX in section 7 (miscellaneous)".
To open a page like
init(8)
, you would use this command:man 8 init
.man regex
vsman 7 regex
To answer your question of the 'subtle differences' between
man regex
andman 7 regex
:man
by default opens the page with the lowest section number. In this case, it is section 3 (Library calls). Opening the page from section 7 (Miscellaneous) is quite different.Pages in different sections address different things, though in this case they are similar, consider
apt
:man -f apt
:In this example,
apt
from section 8 (System administration commands) is completely unrelated to the page from section 1 (Executable programs or shell commands).For future reference, use
man -f PAGE_NAME
to locate all pages with that name in all sections. You can then open a page from the section you want withman SECTION PAGE_NAME
.Manpage sections
The various page sections are as follows and can be found from
man man
: