Dumping to clear text
You can use this technique to dump a man page out to a text file.
$ man -P cat ls > manpg_ls.txt
The above technique is just changing what pager man
uses. Here we're telling it to use the cat
command instead. We then get the man page for the ls
command dumped to a file in clear text.
Example
Here's the first 10 lines of the ls
man page.
$ man -P cat ls | head -10
LS(1) User Commands LS(1)
NAME
ls - list directory contents
SYNOPSIS
ls [OPTION]... [FILE]...
Searching
Another approach is to use alternative pager commands and functions to search through man pages. Several techniques are covered in this U&L Q&A, titled: Reading and searching long man pages.
/
in the man page and then whatever you want to search for andenter
. Hittingn
moves to the next match and matches should be highlighted. – terdon Jan 18 '14 at 15:05