Man : How to get a list of ALL commands with a manpage

according to the web these commands return such a list

apropos .
man -k .

HOWEVER, I have found that the MAN command returns things NOT on that list

for example

man ncctl
man ncinit
man ncdestroy
man nclist

All of those return a man page (while the file paths are different, the contents are the same
and each command is mentioned on the page

     ncctl - Control NFS kernel credentials

     ncctl [-Pvh] {{init | set} [-F] -p principal | {destroy | unset} |
           {list | get}} [path ...]
     ncinit [-PvhF] -p principal [path ...]
     ncdestroy [-Pvh] [path ...]
     nclist [-Pvh] [path ...]

So any idea how to get a PROPER list?

those nc commands all refer to the same page (they’re symlinks in the directory)
Screen Shot 2023-03-13 at 8.01.44 AM

not an entirely uncommon thing where commands are closely related

/usr/libexec/makewhatis used to fix this until Apple forced the man directories read-only.
Some commands are available on install, others get installed with certain new features/options.
Even apples updates do not rebuild the apropos database properly because it should be in a writable area.

unfortunately makewhatis, which is whats behind apropos, uses a different algorithm than MAN does to list pages :frowning:

if you do

apropos ncdestroy

you should get

ncdestroy: nothing appropriate


man ncdestroy

does yield a page (at least here it does)

this seems to be a result of MAN actually using both the MANPATH and PATH as well as some other heuristics to locate man pages
Its described in the man page for man under SEARCH PATH FOR MANUAL PAGES