When supplied with no arguments,
cfman
will check all files (matching *.*) it finds in each man directory in
your colon-delimited
$MANPATH
envariable if set, or in
/usr/man
otherwise. It first verifies that the
.TH
says
the man page is really where it should be, e.g. if the
line is
.TH WIDGET 4
Cfman then skips ahead to the SEE ALSO section and retrieves all comma-delimited entries of the general form pagename(section). It first looks in the file ../mansection/pagename.section. If this fails and the current file ended in one of [npl], but the section referenced is either 1 or 8, then it will check in ../man8. Failing this, cfman checks to see whether the referenced man page has been installed stripped of its subsection, e.g. uucp(1c) has found its way into uucp(1). It then checks to see whether something in section 1 has been mis-installed in section 8, or vice versa, or either one in section l mis-installed in the in section 8 and vice-versa. If all else fails, cfman will guess that a man page is referenced without its proper subsection, as in a reference to rcp(1) that should really have been to rcp(1c). If it finds the misplaced man page, it reports where the reference thought it was and where it really was. Otherwise it reports the man page as missing.
The $MANPATH variable may be overridden by the -p option. All checks will be performed across each subtree specified in the manpath (either from the environment of the command line), unless altered with the -x option. As a short-cut, the xrefpath may have a leading colon to indicate that it is to be concatenation of the manpath and the supplied xrefpath.
You can restrict the sections checked with the -s switch. By default, sections 1 through 8 will be examined. The section may be a shell metacharacter expression, like or
You may restrict the individual man pages cross-referenced by specifying which ones you're interested in on the command line. These may be full pathnames, simple names like or a shell metacharacter expression like If no period occurs in the simple name, it is assumed to mean that the name may have any extension. If you list specific man pages on the command line and cfman finds none matching your specification, it will report this fact. See the EXAMPLES section.
Man pages that are linked by placing a .so directive on the first line will be correctly followed, and no man page in the same subtree. Very limited support for alternate man macros is provided: the Rand MH Message Handling System 's man macro set are recognized, as is Larry Wall's .Sh replacement for .SH.
Five different tracing levels can be specified with the -d option. If any debugging is turned on, the walk through the different components of the manpath are traced. Debug values are numeric and additive, and are interpreted this way:
1 Trace each man page examined 2 Trace each cross reference examined 4 Trace each .TH check 8 Trace each file-existence test 16 Trace each line
Tracing information and other warnings are printed to stderr, but normal messages about bad cross references are printed to stdout as that is cfman's principle task.
Embedded troff string macros starting \*( cannot be resolved, and they will trigger a warning message if found in the .TH or SEE ALSO sections.
cfman # do all in $MANPATH cfman -p /export/exec/sun3/share/man # sun man pages cfman -p $HOME/man:/usr/local/mh/man:/usr/local/man:/usr/man cfman -p /usr/local/man -x :/usr/man # xref also in /usr/man cfman -s 18nlp # only these sections cfman '*tty*' fubar # check for *tty*.* and fubar.* cfman `pwd`/*.[1-8] # just check these files cfman -s 23 'sys*' # sys*.* files in sections 2,3 cfman -s 1 -p /export/exec/sun3/share/man
The last command produced this output on my machine:
banner.1v: thinks it's in banner(1) foption.1: skyversion(8) missing from.1: prmail(1) missing make.1: rstat(8c) missing man.1: apropos(1) missing old-perfmon.1: missing .TH oldperfmon.1: missing .TH oldsetkeys.1: thinks it's in setkeys(1) organizer.1: restore(1v) really in restore(8) sunview.1: traffic(1) really in traffic(1c) sort.1v: thinks it's in sort(1) sum.1v: thinks it's in sum(1)