lp.1 (2010 09)
l
lp(1) lp(1)
NAME
lp, lpalt, cancel - print/alter/cancel requests on an LP destination
SYNOPSIS
lp [-c][-ddest][
-m][-nnumber][-ooption][-ppriority][-s
][-ttitle][-w][file ...]
lpalt id [-ddest][-i
][-m][-nnumber][-ooption][-ppriority][
-s][-ttitle][-w]
cancel [id ...] [dest ...] [
-a][-e][-i][-uuser][-f]
DESCRIPTION
The
lp command queues files for printing. The
lpalt command changes information in a queued
request. The
cancel command deletes a queued request.
lp Command
The
lp command arranges for the named files, file ..., and associated information (collectively called a
request ) to be queued for output to a destination in the LP (line printer) subsystem. The process is called
printing, regardless of the actual output device.
lp associates a unique identifier with each request and writes it to standard output, using the message:
request id is dest -sequence (
fileinfo )
The request ID is dest -sequence , which can be used later to alter, cancel, or find the status of the request
(see lpalt and cancel below, and lpstat (1)).
For example, in the following message,
request id is pr47lf8e-2410 (1 file)
the request ID is pr47lf8e-2410
.
lp Options and Arguments
lp recognizes the following options and arguments. The keyletter options can be specified in any order.
The file ... names must be last.
file ... Print each named file. If no file names are specified, standard input is assumed. The
hyphen symbol (
-) also specifies standard input and can be intermixed on the command
line with file names. If more than one - is specified, all but first are ignored. Files are
printed in the same order in which they are specified. A maximum of 832 file names can
be specified.
-c Copy the named files to LP subsystem spooling directories.
Normally, the files are linked into a spool directory. The ownership and mode of the
linked files remain unchanged. If the
-c option is given, or linking is not possible
(perhaps because the files do not reside on the same filesystem as that of the spooling
directory), the files are copied into the spool directories. The ownership and mode of the
copies are set to allow read and write access to owner lp and read access to group lp
only.
If the files are linked rather than copied, any changes made to the named files after the
request is made but before it is printed will be reflected in the printed output. Standard
input is always copied instead of linked.
-ddest Select dest as the printer or class of printers that is to do the printing. If dest is a
printer, the request will be printed only on that specific printer. If dest is a class, the
request will be printed on the first available printer that is a member of the class. Under
certain conditions (printer unavailability, file space limitation, etc.), requests for a
specific dest might not be accepted (see accept (1M) and lpadmin (1M)).
If the
-d option is omitted, dest is taken from the environment variable LPDEST. If that
variable is unset or empty, dest is taken from the environment variable PRINTER.If
that variable is unset or empty, the default queue is used. If there is no default queue, or
default queue exists but is empty or has invalid destination entry, or LPDEST is set but
invalid, PRINTER is set but invalid, lp issues an error message and the request is not
queued. Printer and class names and the default queue are defined by your LP subsys-
tem administrator (see lpadmin (1M) and lpstat (1)).
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1