> whereis(1)? Again, not POSIX, but might not deviate so much. Sadly, it really does. I'll leave you with macOS's annoyingly terse manpage for the whereis(1) utility:
*WHEREIS*(1) General Commands Manual > *WHEREIS*(1) > *NAME* > *whereis* – locate programs > *SYNOPSIS* > *whereis* [*program* *...*] > *DESCRIPTION* > The *whereis* utility checks the standard binary directories for the > specified programs, printing out the paths of any it finds. > The path searched is the string returned by the sysctl(8) utility for > the > “user.cs_path” string. > *SEE ALSO* > find(1), locate(1), man(1), which(1), sysctl(8) > *COMPATIBILITY* > The historic flags and arguments for the *whereis* utility are no > longer > available in this version. > *HISTORY* > The *whereis* command appeared in 3.0BSD. > Mac OS X 10.13 April 27, 1995 Mac OS X > 10.13 *$ whereis groff* > > /usr/bin/groff > *$ whereis troff* > > /usr/bin/troff > *$ whereis man* > > /usr/bin/man It's hopeless... :( Solaris's `man -k` does a better job of that; but naturally `man -k` means something else on other systems: [image: solaris.png] > The locations vary, e.g. a user's $MANPATH. Have the user specify it? That won't help... when I said how "*(NodeJS) shells out to the system to locate manpages for display/processing"*, I was mainly referring to how Node talks to the system's man(1), asking it where the pages are located that address a user-specified topic, etc. Or if the user wants to run `apropos` and get a search rolling, it need to know what to run / what arguments to pass to locate manpages.. :( On Thu, 30 Aug 2018 at 20:59, Ralph Corderoy <ra...@inputplus.co.uk> wrote: > Hi John, > > > I should ask, what's the most reliable way of running `man -a -w`? > > I thought this was universal to `man` implementations > > Neither are POSIX. > > > but Solaris told me otherwise. illumos uses `man -w` to update the > > `makewhatis` database > > whereis(1)? Again, not POSIX, but might not deviate so much. > > $ whereis sleep | fmt > sleep: /usr/bin/sleep /usr/share/man/man3/sleep.3.gz > /usr/share/man/man3/sleep.3p.gz /usr/share/man/man1/sleep.1.gz > /usr/share/man/man1/sleep.1p.gz > $ whereis -m sleep | fmt > sleep: /usr/share/man/man3/sleep.3.gz /usr/share/man/man3/sleep.3p.gz > /usr/share/man/man1/sleep.1.gz /usr/share/man/man1/sleep.1p.gz > $ > > > The reason this is important is because it's how the NodeJS > > environment shells out to the system to locate manpages for > > display/processing. > > The locations vary, e.g. a user's $MANPATH. Have the user specify it? > > -- > Cheers, Ralph. > https://plus.google.com/+RalphCorderoy > >