The surprising longevity of Unix manpage formatting

August 20, 2017

As part of writing yesterday's entry, I wound up wanting to read the 4.3 BSD ifconfig manpage, which is online as part of the 4.3 BSD source tree at More exactly, I wanted to see more or less how it had originally looked in formatted form, because in source form the bit I was interested in wasn't too readable:

.TP 15
.BI netmask " mask"
(Inet only)
Specify how much of the address to reserve for subdividing
networks into sub-networks.

If I wrote and dealt with Unix manpages more than occasionally, perhaps I could read this off the top of my head, but as it is, I'm not that familiar with the raw *roff format of manpages. So I decided to start with the simplest, most brute force way of seeing a formatted version. I copied the raw text into a file on my Linux machine and then ran 'man -l' on it. What I hoped for was something that wasn't too terribly mangled so that I could more or less guess at the original formatting. What I got was a manpage that was almost completely intact (and possible it's completely intact).

To me, this is surprising and impressive longevity in manpage formatting. The 4.3 BSD ifconfig manpage dates from 1986, so that's more than 30 years of compatibility, and we can go back even further; it appears that V7 manpages (such as the one for ls) still format fine.

(V6 manpages are where things break, because apparently the man *roff macros were changed significantly between V6 and V7. One of the visible signs of this is that many of the macros were upper-cased; the V6 ls manpage has things like .th instead of the V7 .TH.)

I'm not going to speculate on reasons for why the man macros have been so stable for so long, but one thing it suggests to me is that the initial V7 set probably didn't have anything particularly wrong with them. On the other hand, the BSD people did build a completely new set of manpage macros in 4.3 Reno and Net/2, the mdoc macros, which have been carried forward into the current *BSDs.

(For more on this, see both The History of Unix Manpages and Wikipedia's history of manpages.)

Written on 20 August 2017.
« Subnets and early Unix implementations of TCP/IP networking
Hashed Ethernet addresses are not anonymous identifiers »

Page tools: View Source, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Sun Aug 20 01:36:44 2017
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.