[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 292
  • Last Modified:

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 ?
0
allquest
Asked:
allquest
  • 3
  • 2
1 Solution
 
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
 
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

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now