LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 06-07-2016, 09:09 AM   #1
Ned Radd
LQ Newbie
 
Registered: Apr 2016
Posts: 20

Rep: Reputation: Disabled
How Do You Get to Linux Command(2)?


In the Man and Info Pages. you frequently see references to alternative pages that you can look up, but nowhere does it say how to get to those pages.

For instance, in a terminal window I can enter on the command line the following command:

man man

Turns out, man can do a lot. Near the bottom though, you find this:

SEE ALSO
apropos(1), groff(1), less(1), manpath(1), nroff(1), troff(1), whatis(1), zsoelim(1), setlocale(3), manpath(5), ascii(7), latin1(7), man(7), catman(8), mandb(8), the man-db package manual, FSSTND

The ones that have (1) after them are easy to reach, as that is the default. But how about ascii(7), latin1(7), catman(8) and mandb(8)? How do I get to them?
 
Old 06-07-2016, 09:13 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Code:
man  [-C  file]  [-d] [-D] [--warnings[=warnings]] [-R encoding] [-L locale] [-m
       system[,...]] [-M path] [-S list] [-e  extension]  [-i|-I]  [--regex|--wildcard]
       [--names-only]  [-a] [-u] [--no-subpages] [-P pager] [-r prompt] [-7] [-E encod‐
       ing]  [--no-hyphenation]  [--no-justification]  [-p  string]  [-t]  [-T[device]]
       [-H[browser]] [-X[dpi]] [-Z] [[section] page ...] ...
-> man 7 ascii
 
Old 06-07-2016, 11:53 AM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
The way man works is that it goes through all the sections in numerical order until it finds a match for what you entered. So in most cases man foo will get you the man page on foo, whatever section it's in.

Sometimes though that doesn't work. In particular there are a lot of very basic Linux commands that have the same names as the library functions that actually do their work.

Now if this is a general user command, there is no problem because user commands in section 1 take precedence over functions in sections 2-3. But if it is a housekeeping command in section 8, man foo will display the function and not the command. In such cases you just need to include the section number: man 8 foo.
 
2 members found this post helpful.
Old 06-09-2016, 12:03 PM   #4
Ned Radd
LQ Newbie
 
Registered: Apr 2016
Posts: 20

Original Poster
Rep: Reputation: Disabled
Thanks! Put the number first. I would never have thought of that. Pays to ask questions sometimes. Let me give it a try. Yep, it works. Found that the number references a section in the document that is being referred to. Not every section is involved. And man 1 man does not work to bring up Section 1, the default. A final curio is that I can put in a really large number like man 999 catman, and it seems to return the highest section it can find a match in. Handy to know.
 
  


Reply

Tags
finding, help users, info, man-pages, searching



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Any Linux command output to delimited format. Script should work for any command. torrelm@hotmail.com Linux - Newbie 9 09-04-2014 08:54 AM
LXer: How to access Linux command cheat sheets from the command line LXer Syndicated Linux News 0 07-28-2014 08:30 AM
URGENT! Is there any command to get a history command lines and time in SUSE Linux.? igsoper Linux - Software 5 06-25-2009 02:14 AM
LXer: The Linux Command Shell For Beginners: Fear Not The Command Line! LXer Syndicated Linux News 0 12-22-2008 06:30 PM
Translating windows pscp command to linux scp command help robward Linux - General 2 01-17-2008 06:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration