How do I perform full text search in man pages?
I'm aware about apropos/man -k
, but they search in summaries, while I need to search entire man pages.
How can I do full text searches in man pages?
To search within the text of your manual pages, and not just their headings, use man -K
. You can search for simple search strings (e.g. man -K "example text"
), or use the --regex
option to use regular expressions in your search.
It will give you the first matching manual page; press q
to close it and you will be presented with the option of reading the next match (Enter
), skipping the next match (Ctrl-D
), or quitting altogether (Ctrl-C
).