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 ...

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.