I have a set of man pages in a non-standard location; however, the location is on my MANPATH (and I verified this with man --path). When I do

man fst-infl

(where fst-infl has a man page in this non-standard location), it works: it brings up the man page for fst-infl.

But when I do

man -k fst-infl

I get

fst-infl: nothing appropriate

Same for man -f or /usr/bin/apropos. All of these work fine for programs that are on the default MANPATH, e.g. man -k fstab-decode.

Why doesn't man -k look in the same place that plain man does? More specifically, why doesn't it use MANPATH?

  • Have you tried using mandb? – ramonovski Jun 5 '13 at 19:33
  • 2
    Maybe the whatis database is not up to date or the makewhatis or the equivalent on your system wasn't called with the same MANPATH – Stéphane Chazelas Jun 5 '13 at 19:40
  • Well, I can see that even if it was called (it's run by root, right?), makewhatis wouldn't know about the MANPATH that I set in my ~/.bashrc. But what puzzles me is that 'man' by itself finds this man file just fine, but 'man -k' does not. – Mike Maxwell Jun 5 '13 at 19:54
  • @ramonovski: No, and it doesn't seem to be installed on our system. – Mike Maxwell Jun 5 '13 at 19:56
  • @MikeMaxwell In some systems it's called man-db – ramonovski Jun 5 '13 at 20:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.