Linux MAN page question

Hello,

I have couple of question regarding using Man pages in Linux.

1. When i get into the folder /usr/share/man, I could see folders such as man1, man2, man3, man4 ......man9. what are all those?  In some article, I noticed something like "refer man5 page" etc. How can i do that?

2. Can I convert the Man pages into a file so that I can take print out of it or save it for future reference.


Thanks,
Ashok
rdashokrajAsked:
Who is Participating?
 
jazzIIIloveConnect With a Mentor Commented:
Hi there;

Some commands have multiple man pages. For instance, the passwd command has a man page in section 1 and another in section 5. By default, the man page with the lowest number is shown. If you want to see another section than the default, specify it after the man command:

man 5 passwd

If you want to see all man pages about a command, one after the other, use the -a to man:

man -a passwd

This way, when you reach the end of the first man page and press SPACE again, the man page from the next section will be displayed.

Best regards...

0
 
michofreihaConnect With a Mentor Commented:
man ls > file_name

In order to append the same file

man ls >> file_name
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
fosiul01Commented:
if you want some informaiton, you type

man ls = to get information about ls command
you dont go to /usr/share/man folder for that
0
 
TintinCommented:
man man

to find out all about man and the various categories.

0
 
TintinConnect With a Mentor Commented:
To refer to a particular section, just do

man 5 name
0
 
rdashokrajAuthor Commented:
Thanks so much for all your responses.
0
 
rdashokrajAuthor Commented:
Hi fosiul01,

In the script given in the specified page: http://www.cyberciti.biz/tips/how-do-i-print-out-a-linux-man-or-info-page.html
has one small bug.

Instead of this line,  man $i  col -b > $OUTDIR/$i.txt
the syntax should be as  man $i | col -b > $OUTDIR/$i.txt

The pipe is left out in it.

Just want to bring to your notice.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.