Linux Cookbook [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Linux Cookbook [Electronic resources] - نسخه متنی

Carla Schroder

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
تنظیمات قلم


اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
لیست موضوعات
افزودن یادداشت جدید

Recipe 1.8. Printing man Pages

1.8.1 Problem

You want to print a

page, nicely formatted and readable. You have tried
man foo | lpr, but it doesn't
look very good. The margins are too small, and all the formatting is

1.8.2 Solution

One way to print a nicely formatted man page is to use the
-t flag, which formats it especially for
printing. man finger is good for practice,
because it's only two pages long:

$ man -t finger | lpr

To use a networked printer:

$ man -t finger | lpr -P printername

To see your available printers:

$ lpstat -p -d

Another option is to use the following
command, which formats the page in HTML and sends it to the web
browser of your choice:

$ man -Hmozilla finger

Then use the browser's print command. Be sure there
is no space between -H and the browser name.

1.8.3 Discussion

All of the major Linux distributions ship with
CUPS, the Common Unix Printing System.
CUPS supports both the System V (lp) and
Berkeley (lpr) commands. This recipe uses the
Berkeley commands. Here is the System V equivalent.

$ man -t finger | lp

To use a networked printer:

$ man -t finger | lp -d printername

1.8.4 See Also

  • man(1) ,

    lpr(1) ,


  • Chapter 14

  • CUPS Software Users Manual (


/ 435