lp(1) lp(1)NAME lp, cancel - send or cancel requests to a line printer for a Berkeley file system (4.2) SYNOPSIS lp [-c] [-ddest] [-m] [-nnumber] [-ooption] [-s] [-ttitle] [-w] [file...] cancel jobno... [printers] cancel printers [jobno]... DESCRIPTION lp arranges for the named files and associated information to be printed by a line printer. Note that files must be readable by the lp user account since /usr/bin/lp is set to change the effective user ID to lp. If the permissions on files do not allow lp to read them, files must be piped to lp(1) to print them. (For example, cat files|lp). If no filenames are mentioned, the standard input is as- sumed. The filename - stands for the standard input and may be supplied on the command line in conjunction with named files. The order in which files appear is the same order in which they will be printed. lp associates a unique jobno with each request and prints it on the standard output. This jobno can be used later to cancel (described later in this section) or find the status (see lpstat(1)) of the request. The following flag options to lp may appear in any order and may be intermixed with filenames. -c Makes copies of the files to be printed immediate- ly after lp is invoked. Normally, files will not be copied, but will be linked whenever possible. If the -c flag option is not given, then the user should be careful not to remove any of the files before the request has been printed in its entire- ty. It should also be noted that in the absence of the -c flag option, any changes made to the named files after the request is made but before it is printed will be reflected in the printed output. -ddest Chooses dest as the printer or class of printers selected to do the printing. If dest is a printer, then the request will be printed only on that specific printer. If dest is a class of printers, then the request will be printed on the first available printer that is a member of the April, 1990 1
lp(1) lp(1)class. Under certain conditions (printer unavai- lability, file space limitation, and so forth), requests for specific destinations may not be ac- cepted (see accept(1M) and lpstat(1)). By de- fault, dest is taken from the environment variable LPDEST (if it is set). Otherwise, a default des- tination (if one exists) for the computer system is used. Destination names vary between systems (see lpstat(1)). -m Sends mail via mail(1) after the files have been printed. By default, no mail is sent upon normal completion of the print request. -nnumber Prints number copies (default of 1) of the output. -ooption Specifies the printer-dependent or class-dependent options. Several such options may be collected by specifying the -o key character more than once. For more information about what is valid for op- tions, see ``Models'' in lpadmin(1M). -s Suppresses messages from lp(1) such as request id is.... -ttitle Prints title on the banner page of the output. -w Writes a message on the user's terminal after the files have been printed. If the user is not logged on, then mail will be sent instead. cancel cancels line printer requests that were made by the lp(1) command. The command line arguments may be either re- quest ids (as returned by lp(1)) or printer names (for a complete list, use lpstat(1)). Specifying a request id can- cels the associated request even if it is currently print- ing. Specifying a printer cancels the request which is currently printing on that printer. In either case, the cancellation of a request that is currently printing frees the printer to print its next available request. NOTES lp is an AT&T command originally intended for use with line printers, but flexible enough to be useful with other dev- ices. lpr(1) performs a parallel function, but is neverthe- less a distinct command. FILES /usr/bin/lp /usr/bin/cancel /usr/spool/lp/* 2 April, 1990
lp(1) lp(1)SEE ALSO enable(1), lpq(1), lpr(1), lpstat(1), mail(1), accept(1M), lpadmin(1M), lpsched(1M). ``Managing Peripherals'' in A/UX Local System Administra- tion. April, 1990 3