LP(C) XENIX System V LP(C)
Name
lp, lpr, cancel - Send/cancel requests to lineprinter.
Syntax
lp [options...][name...]
or
lpr [options...][name...]
cancel [request ID s] [printers]
Description
lp causes the named files and associated information
(collectively called a ``request'') to be printed by a
lineprinter. lp and lpr are equivalent commands and may be
used interchangeably. If no file names are mentioned, the
standard input is assumed. The file name - 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 request ID with each request and
prints it on the standard output. This request ID can be
used later to cancel (see cancel) or find the status of the
request (see lpstat(C)).
The following options to lp may appear in any order and may
be intermixed with file names:
-c Makes copies of the files to be printed
immediately when lp is invoked. Normally, files
will not be copied, but will be linked whenever
possible. If the -c 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
entirety; 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
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 class. Under
certain conditions (for example, printer
unavailability or file space limitation), requests
for specific destinations may not be accepted (see
accept(C) and lpstat(C)). By default, dest is
taken from the environment variable LPDEST (if it
is set). Otherwise, a default destination (if one
exists) for the computer system is used.
Destination names vary between systems (see
lpstat(C)).
Page 1 (printed 2/7/91)
LP(C) XENIX System V LP(C)-m Sends mail (see mail(C)) after the files have been
printed. By default, no mail is sent upon normal
completion of the print request.
-nnumber Prints number of copies of the output. The
default is one.
-ooption Specifies printer-dependent or class-dependent
options. Several such options may be collected by
specifying the -o keyletter more than once. For
more information about what is valid for options,
see lpadmin(ADM).
-r Removes file after sending it.
-s Suppresses messages from lp(C) such as ``request
id is ...''.
-ttitle Prints title on the banner page of the output.
-T Local printing option. Sends print job to printer
attached to the terminal.
-w Writes a message on the user's terminal after the
files have been printed. If the user is not
logged in, then mail is sent instead.
The file /etc/default/lpd contains the setting of the
variable BANNERS, whose value is the number of pages printed
as a banner identifying each printout. This is normally set
to either 0 or 1.
Cancel cancels line printer requests that were made by the
lp(C) command. The command line arguments may be either
request IDs (as returned by lp(C)) or printer names (for a
complete list, use lpstat(C)). Specifying a request ID
cancels the associated request even if it is currently
printing. 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. User
identification and accounting data spool area contains
BANNERS setting.
Files
/etc/passwd
/usr/spool/lp/*
/etc/default/lpd
See Also
enable(C), lpstat(C), mail(C), accept(C), lpadmin(ADM),
lpsched(ADM)
Page 2 (printed 2/7/91)
LP(C) XENIX System V LP(C)
Notes
The file's directory and all directories in the path must
also be publicly readable. The following are three possible
workarounds:
pr filename | lp
cat filename | lp
lp -c filename
Page 3 (printed 2/7/91)