3

For example, run apropos printf:

Printf(3o)               - Formatted output functions
Stdlib.Printf(3o)        - no description
gprintf(1), printf(1)    - format and print data
format(ntcl)             - Format a string in the style of sprintf
fwkpfv(1)                - FireWire kprintf viewer
printf(1)                - formatted output
xprintf(5)               - extensible printf

printf(3) is not listed, but man 3 printf can find that man page.

Meanwhile, stderr prints many errors like this one:

makewhatis: /usr/lib/libgcc_s.1.dylib: Not a directory

What should I do to make apropos and man -k work properly?

1

Saw a handy shell trick posted in Apple Discussions to get rid of the hundreds of error messages whenever doing a man -k or apropos type inquiry:

apo() { apropos "$@" 2> /dev/null; }

myman() { man "$@" 2> /dev/null; }

See https://discussions.apple.com/thread/250812698 for the discussion.

  • Nice call suppressing the stderr, but shouldn't apropos find printf(3 to be proper functioning? +1 for making the error clearer and maybe the OP feels proper is just suppressing the errors. – bmike Nov 9 '19 at 18:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .