(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version



Printing FAQ

How do I print man pages from the command line?

 man ls | col -b | lp
 



Click here to add your comments





Thu Feb 14 10:18:23 2008: Subject: Far better is...   anonymous


man -t <command> | lpr

e.g.: man -t ls | lpr

This will give you a very nice fully formatted, comfortably readable print-out of you man page, including title and page-numbers.

2 cent.



Thu Feb 14 10:40:38 2008: Subject:   TonyLawrence

gravatar
On a modern Linux or BSD system, yes.. but not on the old SCO boxes this was written for..



Tue Aug 25 15:17:17 2009: Subject: man to PDF   anonymous

gravatar
Example to produce a pdf file for grep:
man -t `man -w grep` | ps2pdf - grep.pdf
Bye. SB




Tue Aug 25 17:21:32 2009: Subject:   TonyLawrence

gravatar
Again, yes,but not for the crappy old systems this post referenced.



Sun Sep 6 02:20:27 2009: Subject: OS X solution   bofors
http://www.infowars.com
gravatar
The solutions proposed above did not work so great for OS X or at least choked my printer.

Here is what did:

man -t "_cmd_" | open -f -a /Applications/Preview.app/

Where you replace _cmd_ with the name of the command you want to print the man page for. For example, diskutil:

man -t "diskutil" | open -f -a /Applications/Preview.app/

That generates a nice PDF to print out.

Cheers,
~bofors



Sun Sep 6 10:00:36 2009: Subject:   TonyLawrence

gravatar
Right.

Having this old stuff here can be confusing - that's why I have the warning ahead of the article.

It is nice to have more modern answers in the comments.



Tue Sep 15 21:38:32 2009: Subject:   anonymous

gravatar
man -t expect | lpr

did exactly what the man said it would.
thank you it's what i needed.
ubuntu 9.04




Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



/SCOFAQ/FAQ_scotec7printman.html copyright 1997-2003 (various) All Rights Reserved

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.


book graphic unix and linux troubleshooting guide

My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!



 I sell and support
 Kerio Mail server






More:
       - FAQ
       - Printing


Unix/Linux Consultants

Skills Tests

Guest Post Here











My Favorites

Change Congress