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] [®le ...] lpalt id [-ddest][-i][-m][-nnumber][-ooption][-ppriority][-s][-ttitle][-w]cancel [id ...] [printer ...] [-a][-e][-i][-uuser]

DESCRIPTION

The lp command queues ®les 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 ®les, ®le ..., 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 identi®er with each request and writes it to standard output, using the message:

request id is dest-sequence (®leinfo)

The request ID is dest-sequence,which can be used later to alter, cancel, or ®nd 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 speci®ed in any order. The ®le ... names must be last. Blanks are not permitted between a keyletter and its argument.

file ...

Print each named ®le.

If no ®le names are speci®ed, standard input is assumed. The

 

hyphen symbol (-) also speci®es standard input and can be intermixed on the command

 

line with ®le names. Files are printed in the same order in which they are speci®ed.

-c

Copy the named ®les to LP subsystem spooling directories.

 

Normally, the ®les are linked into a spool directory. The ownership and mode of the linked

 

®les remain unchanged. If the -coption is given, or linking is not possible (perhaps

 

because the printer is not physically attached to the local system or cluster), the ®les 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 ®les are linked rather than copied, any changes made to the named ®les after the

 

request is made but before it is printed will be re¯ected 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 speci®c printer. If dest is a class, the request will

 

be printed on the ®rst available printer that is a member of the class. Under certain condi-

 

tions (printer unavailability, ®le space limitation, etc.), requests for a speci®c dest might not

 

be accepted (see accept(1M) and lpadmin(1M)).

 

If the -doption 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 de®ned. 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 de®ned 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 -ooption. For information about the options that are available for a printer supported

HP-UX Release 11i: December 2000

− 1 −

Section 1−469

l