Create a manpage addressing several executables

I am packaging an application with a bunch of executables accepting roughly the same arguments. I would like to write (and provide) only one manpage with common explanations and the list of arguments.

In short, I would like that

man execFoo
man execBar

point to the same page.

I know how to generate two identical execFoo.1 and execBar.1 but they seem suboptimal. Since I plan to release this package for Debian, solutions relying on Debian packaging chain (such as dh_installmake) would also be fine.

Asked By: FabienAndre


Why not simply create one manpage and make the others links? That’s how most, if not all, such programs do it. For example:

$ ls -l /usr/share/man/man1/[ef]*grep.1.gz 
lrwxrwxrwx 1 root root 9 Nov 27  2013 /usr/share/man/man1/egrep.1.gz -> grep.1.gz
lrwxrwxrwx 1 root root 9 Nov 27  2013 /usr/share/man/man1/fgrep.1.gz -> grep.1.gz

As you can see above, egrep and fgrep are links to the main grep man page which is why man egrep brings up man grep.

Answered By: terdon
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.