Code University

      "Where tuition is free!"

News | Images | Contact     
  • Home
  • Coding KC
  • Scripts
  • Software
  • Templates
  • Tutorials
  • About
 

Tutorials

Posted on Jun 21, 2010 at 20:39

Documentation - Creating man(ual) pages


1) Create directory structure.
> mkdir -p /mystuff/share/man
Decide on a root directory where you would like to store your man files. It's a good idea to seperate the custom man files off from the system man files. This way the custom man files have their own location and will be easier to maintain. Here we chose /mystuff/share/man.

2) Create all of the man subdirectories for each possible manual section number.
> mkdir /mystuff/share/man/man1 > mkdir /mystuff/share/man/man2 > mkdir /mystuff/share/man/man3 > mkdir /mystuff/share/man/man4 > mkdir /mystuff/share/man/man5 > mkdir /mystuff/share/man/man6 > mkdir /mystuff/share/man/man7 > mkdir /mystuff/share/man/man8 > mkdir /mystuff/share/man/man9
Each man file will be stored in its respective man section number directory.

3) Setup environment
> vi /etc/profile setenv PATH "${PATH}:/mystuff/share/man"
You'll need to edit the $PATH environmental variable so the shell will know where the custom man files are located. Edit the /etc/profile file and append onto the existing $PATH settings. This will enable all user's shells to locate these files when they are called upon.

4) Make man page Grab this man page template file first. Edit it and name it program.1. Then copy it to its respective man directory. This directory will be called man1.
> cp program.1 /mystuff/share/man/man1
Now a user can access this by typing "man program" or "man 1 program" (default).


Tagged:  Linux, UNIX
Tutorials
  • Introduction
  • Documentation
    Creating man(ual) pages
  • Dual Boot Systems
    Fedora/Windows XP
    Red Hat/FreeBSD
  • Files
    Dynamic PDF generation
  • Linux
    NTP server setup
    Root password reset (grub)
  • Networking
    ndiswrapper setup (wireless)
  • Version Control
    CVS - repo setup
  • Web Hosting
    Apache 2 - Installations
    Apache 2 - Configurations
    Apache 2 - Virtual Hosts
Resources
  • CodeIgniter - MVC Framework
  • HowtoForge - Linux Tutorials
  • Linux Today - Linux News
  • Lxer - Linux News Feed
  • Monsterb - Linux, Podcasting
  • MySQL - Databasing
  • Perl - Programming
  • PHP - Programming
  • Systhread - Admin & Programming
  • W3Schools - Web Tutorials
About

Code University contains a wealth of technical information aimed at the computer sciences.


 
Home | Coding KC | Scripts | Software | Templates | Tutorials | About
Top ^
 
© 2007-2012 Code University| Disclaimer
Website template by Arcsin