Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I had to look it up - I knew about the sections but not the 'L'. Apparently it refers to the local machine although how that makes sense in context, I dunno. Anyway, yeah, it just refers to the section the thing is in (sometimes different man pages have the same name) so you can get it by typing 'man foo' unless it's the wrong one. Then 'man 1 foo' will give the specific 'user command' foo. Apparently 'man 1L foo' will give you the user/local command. ('man -a foo' will give you all of them.)
Like 'printf' - if you type 'printf' you get 'printf(1)'. But if you were looking for the 'printf(3)' man page, you'd miss it. So that's why you type 'man -a printf'. Except if you *know* you want 'printf(3)' then that's a waste of time, so you just do 'man 3 printf' to go to it directly.
As far as the see also's, those are references to other man pages that are relevant to the man page you're currently looking at. So, yeah, you just type those in as your next man pages if you want. They're just saying 'check out this specific man page'.
1 User commands
2 System calls
3 Subroutines
4 Devices
5 File formats
6 Games
7 Miscellaneous
8 Sysadmin
n New
Plus, like everything else, there's accretion, I think. 'n' was just the first step. I believe there are others. And apparently nL, too.
OK so the (n) at the end of the command is just for a fast finding the required page in the manual? or do they have several different manuals for the same <command> if so why? where is the logic in building different manuals for the same thing ?
I think you're making this more complicated than it is. As you know, some commands have a similar purpose to others and/or perform operations that are similar to others. As an example, both "find" and "locate" do similar things -- they tell you where a given file is, but they are 2 different commands
The "See Also" section is simply an attempt to be helpful by bringing other related commands to your attention. There's no requirement that you also have to read the man pages of those commands, but if the initial command you initially were researching turned out to be unhelpful, then perhaps one of the commands in the "See Also" section would be what you were looking for. In other words it's just a reference to other related materials.
As digiot indicated, the number refer to a specific section of the man pages, but you could simply run a plain "man <command>" without concerning yourself with the exact section. -- J.W.
Originally posted by hq4ever ...do they have several different manuals for the same <command> if so why? where is the logic in building different manuals for the same thing ?
Well, he's sort of making it more complicated than it is, but it can be kinda complicated.
By and large, yeah, just type 'man <command>'. That's all you really *need* to worry about. You'll get the 'user' pages first and that's generally what you want.
But, for instance, the bash man page is frigging *huge*. So zsh comes with about a dozen man pages, instead. It's just broken down into more easily digestible pieces (though it's also more confusing). So there are rare cases where there are multiple man pages for one command, but it's just a case of breaking down one man page into components. And, as I say, sometimes there will be a user command like 'printf' that as the same name as a 'subroutine', say. So it'll be two different things and the section/number just keeps them unambiguous.
It doesn't help that 'the GNU folks abhor man pages' and do their best to completely screw them up. I do much more than 'abhor' info pages, so I guess it takes all kinds. Also, the body of man pages that you get are collected from all over. Each maintainer of a package may write (or have others write) a few man pages. Giant chunks of those subroutines and so on are maintained by still other people. And so on.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.