Command Reference Guide

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1/!!!intro.1
________________________________________________________________
___ ___
l
lp(1) lp(1)
NAME
lp, lpalt, cancel - print/alter/cancel requests on an LP printer or plotter
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 ...] [printer ...] [-a][-e][-i][-uuser]
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 printer or plotter 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. Blanks are not permitted between a keyletter and its argument.
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. Files are printed in the same order in which they are 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 printer is not physically attached to the local system or cluster), the files are
copied into the spool directories. The ownership and mode of the copies are set to allow
read access to owner lp and group bin 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 condi-
tions (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, the default queue is used, if one has been defined. If there is no
default queue, or LPDEST 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)).
-m Send a mail message (see mail(1)). to the user after the request has been printed. By
default, no mail is sent upon normal completion of the print request.
-nnumber Print number copies of the output. The default is 1.
-ooption Specify a printer-dependent option. You can specify several printer options by repeating
the
-o option. For information about the options that are available for a printer supported
HP-UX Release 11i: December 2000 1 Section 1469
___
___