Computing Facilities
Electrical and Computer Engineering
Northwestern University

CFS Home | FAQs | Policies | PC Software | ECE Home | Search

Printing a Man Page

You can create a copy of an on-line manual page in PostScript or ASCII format using the groff command. You can then print this file on a PostScript printer.

You first need to determine the location of the corresponding unformatted man page file. You can do this with a little help from the find command. Let's say you're wanting to print the man page for ls. You can find the unformatted man page for it like this:

% find `echo $MANPATH | tr : \ ` -name "ls.*" -print
/usr/share/man/sman1/ls.1
/usr/share/man/sman1b/ls.1b

You can now create the corresponding man page file, preview it on-screen, and print it out if you'd like, as follows:

DVI

Create: groff -t -man -Tdvi PATHNAME > manpage.dvi
Preview: xdvi manpage.dvi
Print: lpr -d -Plaser1 manpage.dvi

PostScript

Create: groff -t -man -Tps PATHNAME > manpage.ps
Preview: ghostview manpage.ps
Print: lpr -v -Plaser1 manpage.ps

ASCII

Create: groff -t -man -Tascii PATHNAME | colcrt - > manpage.txt
Preview: more manpage.txt
Print: lpr -Pdot6 manpage.txt

webmaster@ece.nwu.edu.
Last Updated: $Date: 2003/10/27 21:08:57 $