lp(1) — Commands
OSF
NAME
lp, cancel − Sends or cancels a printing request
SYNOPSIS
lp [-cmsw] [-dprinter] [-nnumber] [-ttitle] [file ..]
cancel [request_ID ...] [printer ... ]
The lp command sends the specified files and associated information (collectively called a request) to a line printer for printing. The cancel command cancels printing requests.
FLAGS
Flags for the lp command can appear in any order and can be mixed with filenames.
-cMakes copies of the files to be printed immediately when lp is invoked. Normally, files are not copied, but are linked whenever possible. If the -c flag is not given, be careful not to remove any of the files before the request is finished printing. Note also that in the absence of the -c flag any changes made to the named files after the request is made, but before it is printed, are reflected in the printed output.
-dprinterSelects printer as the device to do the printing (also known as the printing destination). Under certain conditions (printer unavailability, file space limitations, and so on), requests for specific destinations cannot be accepted. By default, printer is taken from the LPDEST environment variable (if it is set). Otherwise, the PRINTER environment variable or a default destination (if one exists) for the system is used. Destination names vary between systems. (See the lpq and lpstat commands.)
-mSends mail (see the mailx command) after the files are printed. By default, no mail is sent upon normal completion of the print request.
-nnumberPrints number copies (default of 1).
-sSuppresses messages from lp, such as request id is ...
-ttitlePrints title on the banner page of the output.
-wFunctions like -m (for compatibility reasons).
DESCRIPTION
The lp command associates a unique ID with each request and prints it on the standard output. If you do not specify a file, or specify a - (dash) in place of a file, lp accepts standard input at this point in the list of files.
The cancel command cancels printer requests made by the lp or lpr commands (see lpr). You can specify either request_ID, to cancel the request with that request ID, or printer, to cancel all requests made by you with that printer as the destination. (If you are operating with superuser authority, all requests to that printer are cancelled, including those of other users.) A specified request is cancelled even if it is currently printing, and the printer is freed to print the next available request.
You can also use the request ID to find the status of the request (see the lpq and lpstat commands).
FILES
/etc/printcapPrinter description file.
/var/spool/∗Spool directories.
/var/spool/∗/cf∗Daemon control files.
/var/spool/∗/df∗Data files specified in cf files.
/var/spool/∗/tf∗Temporary copies of cf files.
/var/spool/∗/minfreeMinimum free space to leave.
/dev/lp∗Line printer devices.
/dev/printerSocket for local requests.
RELATED INFORMATION
Commands: lpc(8), lpd(8), lpq(1), lpr(1), lprm(1), lpstat(1), mailx(1)/Mail(1).