Creating a man page entry? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Creating a man page entry?

digitalranadigitalrana Posts: 19Member
Hi all,
I've recently migrated to linux (ubuntu). One of the interesting things i noticed when i set up my gcc and everything was that i could use the "man" command to view a manual page for any of the predefined functions.

I was wondering, when I write a program, is there any way to have a man page for my program? I'm guessing it would require my program to have some sort of installation procedure which would set up the man page along with my program.

Any ideas?

Comments

  • stoberstober Posts: 9,765Member ✭✭✭
    :
    : Any ideas?
    :
    :


    learn to use google "how to create a man page"

    http://anaturb.net/create_man_p.htm
  • akalexi312akalexi312 Posts: 31Member
    you need to understand how man pages are written first.
    Try "beginning Linux programming book" if you have else here
    are tips/hints to take you in right direction.

    man pages are troff programmed text files stored in gunzipped compresed format in directory /usr/man/man{section_number}


    write a man page file using troff extensions with name convention
    {command_name}.{man_page_section_number}

    ex : your command name is miyaoo then write man page called miyaoo.1
    then test it using groff -Tascii -man miyaoo.1
    then it will display man page to you !! if satisfied then..

    gzip miyaoo.1 to get miyaoo.1.gz and copy it to /usr/man/man1/
    path ;

    type man miyaoo and voila there you have the man page!!!

    [ you need to learn troff/groff commands first ]

    Cheers
    Anand Kulkarni


    : Hi all,
    : I've recently migrated to linux (ubuntu). One of the interesting things i noticed when i set up my gcc and everything was that i could use the "man" command to view a manual page for any of the predefined functions.
    :
    : I was wondering, when I write a program, is there any way to have a man page for my program? I'm guessing it would require my program to have some sort of installation procedure which would set up the man page along with my program.
    :
    : Any ideas?
    :
    :

Sign In or Register to comment.