How can I get raw text output of a manual in my terminal
How can I get raw text output of a manual in my terminal?
I want to have the manual without a "less" type screen displayed.
You can change the pager to cat
using the -P
option:
man -P cat command
where command
is the command of interest whose man page you wish to read.
You can also redirect the man page to a file which you can then open to read:
man command > file
You can directly read the compressed (could be uncompressed too) man
files, residing under /usr/share/man/
in directories corresponding to respective sections.
So for example, to get the raw content of man
page of cat
, you need to read /usr/share/man/man1/cat.1.gz
:
zcat /usr/share/man/man1/cat.1.gz
Similarly, for man 2 fork
:
zcat /usr/share/man/man2/fork.2.gz