sections in this module City College of San Francisco - CS260A
Unix/Linux System Administration

Module: Administration Basics II
module list

Processing man pages

Preview question: Find a simple man page, make a copy of it, uncompress it and examine it. Can you get a sense of what this documentation language means?

man pages are written in a very old documentation language called nroff (or troff). The syntax of the language is at a level similar to HTML, and native nroff commands are very low level. Because of this, nroff commands themselves are rarely used. Instead, macro packages which produce nroff output are used. The package used for man pages, called the man macros, is the only real use of nroff still in existence today. 

Given a page xxx.1 in man format processed by the command man xxx, the command that actually processes a man page to display it is 

nroff -man xxx.1 | ${PAGER:-less}

(Here, less is used if the PAGER environment variable is not set.) This command processes the page so that it will display on a terminal (of type $TERM) and sends it to the screen. The page is first uncompressed, if necessary.

The nroff program is not speedy, and processing a large man page can be labor-intensive. For this reason the result of nroff -man may be saved for quick display the next time the page is needed. All that is required to display this preprocessed page is to cat it to the screen, so this page is referred to as catman format. For brevity, we will not go over how these cached pages are saved, as linux does not cache them on modern systems.


Prev This page was made entirely with free software on linux:  
the Mozilla Project and Openoffice.org   
Next

Copyright 2012 Greg Boyd - All Rights Reserved.