Print Readable Man Pages

Ever wonder how you can get a man page in into a format you can read and print? There’s many methods of doing it (copy and paste is one) but one the easiest I’ve found is:

man command | col -x -b  > command.txt

Where command is the Linux command man page you want to print/view.  From there, open up command.txt in your favorite gui text editor (gedit, kate) and you have a readable format that could be printed quite easily for reference.

This content is published under the Attribution-Noncommercial-Share Alike 3.0 Unported license.

  • http://mamelonsetigero.wordpress.com ChrisC

    IMHO, much better (and easier) is using konqueror as a man and info pages reader; in konqueror’s location bar, type man:command -where command stands for the prog you’re looking for. Then you can browse the man page in a comfortable and nice way (uses CSS so the information looks more clearer), use inlay links (to related manpages), etc. Of course, you can print and preview print results.

  • http://linux-blog.org devnet

    That will work great for KDE based desktops! Thanks for that tip! It is true that Konqueror makes life easier for those of us that choose KDE.

  • http://linuxbraindump.org Hieronymus

    Actually, even better is if you do ‘#command’ gets the the man page and ‘##command’ gets you the info page. I document more kwickies here:

    http://linuxbraindump.org/2007/08/31/konqueror-kwickies/

    But I’m not sure why the need for the col pipe. If I just redirect to a file, it looks fine to me. Maybe because I use ‘less’ as my MANPAGER?