LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   I can't change manual page ... Help me ! (https://www.linuxquestions.org/questions/red-hat-31/i-cant-change-manual-page-help-me-614177/)

minhstone 01-17-2008 01:18 AM

I can't change manual page ... Help me !
 
hi all,
I want to add help document into manual page but i don't want ask "man ./"command". When i ask : # man ./"command" then OK. But i ask : # man "command" then have problem display :"No maual entry for "command"".


Who can help me ... step ..step.. change manual page with some example.

Thank all.

Disillusionist 01-17-2008 02:20 AM

What are you trying to do?

Is this a new man page or are you modifying an existing one?

Have you already written the man page and formatted it to your satisfaction but just need to know were it should be placed?


Once the man page has been written, it should be gzipped and placed in the correct location.

If you have created a man page for my_command and you want to place it in section 1 of the man pages:

call the text file my_command.1
gzip my_command.1
[as root]:
mv my_command.1.gz /usr/share/man/man1/.

The man page can then be referenced using:
man my_command

*** If you are changing a pre-existing manpage, make sure you have a verified backup! ***

ehawk 01-17-2008 02:27 AM

You can read through this:

http://tldp.org/HOWTO/Man-Page/index.html

Which is informative and step-by-step, but long....look especially at chapter 2 and the manpath command to figure out where the man page information is stored.

I also found this package:

http://wolfpack.twu.net/ManEdit/

Which may simplify things for you. I am not sure how up-to-date it is...if you are using a debian-based distribution, you may be able to install it easily using synaptic, if it is still supported. I just looked...it was last updated Feb. 2007, so it is pretty up to date..

minhstone 01-18-2008 12:56 AM

thank you very much !
 
Quote:

Originally Posted by Disillusionist (Post 3025480)
What are you trying to do?

Is this a new man page or are you modifying an existing one?

Have you already written the man page and formatted it to your satisfaction but just need to know were it should be placed?


Once the man page has been written, it should be gzipped and placed in the correct location.

If you have created a man page for my_command and you want to place it in section 1 of the man pages:

call the text file my_command.1
gzip my_command.1
[as root]:
mv my_command.1.gz /usr/share/man/man1/.

The man page can then be referenced using:
man my_command

*** If you are changing a pre-existing manpage, make sure you have a verified backup! ***


Thank you very much.
but if i don't want mv file to /usr/share/man/man1, i want to add directory path in man.config file then how do ...
you can instruct me step to step ?
thanks.

Disillusionist 01-18-2008 01:41 AM

If you have a folder /test that you want to contain your man pages, add the following entry to the /etc/manpath.config file

Code:

MANPATH  /test
However, this will only find your man pages if they are stored in subfolders to denote which section of the manual they belong to.

Therefore your manpage would need to be placed in: /test/man1 for section 1 /test/man2 for section 2


All times are GMT -5. The time now is 10:27 AM.