1

man -K does the job but it's painfully slow to the point that googling is much faster, if Internet connection is available.

Is there a way to have the manpages indexed so that I can do full-text searches against them fast?

  • apropos is fast enough to not to go for internet. Can you post some output of time apropos keyword and your expected fast time ? – SHW Aug 31 '16 at 6:58
  • @SHW apropos searches only the heads of manpages, though. It should be the equivalent of man -k. man -K searches whole manpages, but there's no index with the default setup. I was wondering if there's was an easy to use ready-made solution to speed it up. – PSkocik Aug 31 '16 at 8:57
  • Read the man pages of mandb. mandb - create or update the manual page index caches – SHW Aug 31 '16 at 10:14
1

The old school way is to use glimpse, but there are many other document indexing / site search systems available these days, any one of them would work. You can also write your own based on FTS5 in SQLite if you're so inclined. Just format man pages as plain text and index them.

0

A Google search uses an index to find the relevant information whereas man pages are not indexed on a Unix system.

Furthermore, all systems will only keep compressed man pages by default which implies that man page search has to decompress every single man page on your system.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.