Battles With Boredom

September 14, 2007

How to Print a Man Page

Filed under: ManPageMinute,Techspeak — Peter Nikolaidis @ 3:50 pm

If you want to print a man page, it’s this simple:

man ls | col -b | lp

If you just want to instead save the man page to a file, so you could email it or post it to a web site, just leave out the trailing | lp, as in

man ls | col -b > ls-man.txt

This will save the man page for the ls command without any formatting, to a file named ls-man.txt.

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress

© 2012-2014 Peter C. Nikolaidis All Rights Reserved -- Copyright notice by Blog Copyright