O'Reilly logo

Unix in a Nutshell, 4th Edition by Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

lp

Synopsis

    lp [options] [files]

Send files to the printer. With no arguments, prints standard input. To print standard input along with other files, specify - as one of the files.

Common Options

-c

Copy files to print spooler; if changes are made to file while it is still queued for printing, the printout is unaffected.

-d dest

Send output to destination printer named dest.

-d any

Used after -f or -S to print the request on any printer that supports the given form or character set.

-H action

Print according to the named action : hold (notify before printing), resume (resume a held request), immediate (print next; privileged users only). Mac OS X and GNU/Linux also allow restart with -i to restart a completed job.

-i IDs

Override lp options used for request IDs currently in the queue; specify new lp options after -i. For example, change the number of copies sent.

-m

Send mail after files are printed.

-n number

Specify the number of copies to print.

-o options

Set one or more printer-specific options. Standard options include:

cpi= n

Print n characters per inch. n can also be pica, elite, or compressed.

lpi= n

Print n lines per inch.

length= n

Print pages n units long; e.g., 11i (inches), 66 (lines).

nobanner

Omit banner page (separator) from request.

nofilebreak

Suppress formfeeds between files.

width= n

Print pages n units wide; e.g., 8.5i (inches), 72 (columns).

stty= list

Specify a quoted list of stty options.

-P list

Print only the page numbers ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required