![Forrest logo](/images/logo.png)
groff:tldr:02f5b
groff: Render a man page using the ASCII output device, and display it using a pager.
$ groff -man -T ascii ${path-to-manpage-1} | less --RAW-CONTROL-CHARS
try on your machine
This command is used to view a Unix manual page in plain text format with preserved formatting using the "groff" command and then display it in the "less" pager.
Here's a breakdown of the command:
groff
: It is a formatting command that is mainly used for formatting man pages.-man
: This option specifies that the input file is a Unix man page.-T ascii
: This option specifies the output format to be ASCII text.${path-to-manpage-1}
: This is the path to the man page file that you want to view. Replace${path-to-manpage-1}
with the actual path to the desired man page.|
: This is a pipe symbol that redirects the output of the groff command to the input of the next command.less
: It is a pager command that allows you to view the output one page at a time.--RAW-CONTROL-CHARS
: This option tells less to display the output with raw control characters, preserving the formatting such as bold, underline, etc.
By using this command, the specified man page will be formatted as plain text and displayed in the less pager, allowing you to navigate through the content and view the formatting as intended.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.