How to create a new man page ?

If I typed 'man ls', then there will be a description of ls displaying on the screen. Can I add man pgae by myself.
What editior should I use ? How do I create it ?
Which dirrectory should I put it after I finished ?
allquestAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AstromanCommented:
You can use any editor you want, but you need to use the troff/groff (groff is gnu troff) typesetting system to write it.

Don't be disturbed, it's no harder than basic HTML.

When you have written the page, either put it in a directory somewhere listed in the environment variable "MANPATH", or make a new directory and add it to the MANPATH.

The structure for directories is normally:

man
 + man1
 + man2
 + <more sections>

You put the file in the correct section.

You'll have to find out about troff yourself for only 25 points, as I'd just have to look it up myself as it's so long since I've written a man page!

Happing manning!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
allquestAuthor Commented:
I use pico editor to create the page called sample.1 and I put
it into man1 directory.

Then, I typed 'man 1 sample', why it told me there isn't a manual page call sample.
0
AstromanCommented:
Check that the path to the man directory is in your manpath.

type:

echo $MANPATH

Also, have you formatted the man page using troff? If not, it won't understand it.

Finally, you may also need to run either 'catman' or 'man -w' to build the database for apropos searches. (I can't remember exactly which command, one is Linux, and one SunOS).

Try copying a different man page as a test manpage in the same directory as sample.1 (e.g. myTest.1) and see if you can get at that by man myTest. If you can, its a formatting problem, if you can't it's a lookup/MANPATH problem.

Hope thats some help...

Leon
0
allquestAuthor Commented:
Is there a tutorial or  help which will explain hoe to do this ?
Any URL or linux web-site ?
0
AstromanCommented:
I dont know af any, have you tried searching??

I learnt by reading the book "Unix System Administration" by O'Reilly.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.