top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Linux: Why there are so many pages like "man sleep" or "man 3 sleep" is in system ?

+6 votes
339 views
Linux: Why there are so many pages like "man sleep" or "man 3 sleep" is in system ?
posted Oct 29, 2013 by Neeraj Mishra

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+2 votes
 
Best answer

Actually the man page is divided in to sub manuals according to its type(Commands / Library Function/ System call / routines related to kernel )

Refrence from man file
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 conventions), e.g. man(7), groff(7)
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]

so when you type man sleep then it takes man 1 sleep ( As it is a command )
But when you type man 3 sleep then it is going to sub manual 3 which is library function.

For more details u can type man man

answer Oct 29, 2013 by Sachidananda Sahu
Thanks to share valuable information.
+1 vote

Because sleep can be multiple stuff i.e. sleep can be a C function, sleep can be a linux command hence we need a mechanism which can show different sleep (or similar) as the requirement of the help will be different for different sleep.

answer Oct 29, 2013 by Salil Agrawal
...