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.
-c
Copy files to print spooler; if changes are made to file while it is still queued for printing, the printout is unaffected.
-d
destSend 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
namePrint request on preprinted form name. name references printer attributes set by the administrative command lpforms.
-H
actionPrint according to the named action: hold
(notify before printing), resume
(resume a held request), immediate
(print next; privileged users only).
-i
IDsOverride 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
numberSpecify the number of copies to print.
-o
optionsSet one or more printer-specific options. Standard options include:
cpi= n | Print n characters per inch. n can also be |
lpi= n | Print n lines per inch. |
length= n | Print pages n units long; e.g., |
nobanner | Omit banner page (separator) from request. |
nofilebreak | Suppress formfeeds between files. |
width= n | Print pages n units wide; e.g., |
stty= list | Specify a quoted list of stty options. |
-p
Enable notification of completion of the print job. Solaris only.
-P
listPrint only the page numbers specified in list.
-q
nPrint 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
nameUse the named print wheel or character set for printing.
-t
titleUse title on the printout's banner page.
-T
contentSend 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
modesPrint according to locally defined modes.
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