home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


lp

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 .

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.

-f name

Print request on preprinted form name . name references printer attributes set by the administrative command lpforms .

-H action

Print according to the named action : hold (notify before printing), resume (resume a held request), immediate (print next; privileged users only).

-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

Enable notification of completion of the print job. Solaris only.

-P list

Print only the page numbers specified in list .

-q n

Print request with priority level n (39 = lowest).

-r

Don't adapt request if content isn't suitable; reject instead. (Obscure; used only with -T .)

-s

Suppress messages.

-S name

Use the named print wheel or character set for printing.

-t title

Use title on the printout's banner page.

-T content

Send request to a printer that supports content (default is simple ; an administrator sets content via lpadmin -I ).

-w

Write a message on the user's terminal after files are printed (same as -m if user isn't logged on).

-y modes

Print according to locally defined modes .

Examples

Send mail after printing five copies of report :

lp -n 5 -m report

Format and print thesis ; print title too:

nroff -ms thesis | lp - title


Previous: Reference: lookbib UNIX in a Nutshell: System V Edition Next: Reference: lpq
Reference: lookbib Book Index Reference: lpq

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System