Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ lp(1) — HP-UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

enable(1)

lpstat(1)

mail(1)

slp(1)

accept(1M)

lpadmin(1M)

lpsched(1M)

mklp(1M)

rcancel(1M)

rlp(1M)

rlpdaemon(1M)

rlpstat(1M)

LP(1)  —  HP-UX

NAME

lp, cancel − send/cancel requests to an LP line printer

SYNOPSIS

lp [−c] [−ddest ] [−m] [−nnumber ] [−ooption ] [−s] [−ttitle ] [−w] [ files ... ]

cancel [ ids ] [printers ] [−a] [−e] [−i] [−uuser ]

DESCRIPTION

Lp arranges for the named files and associated information (collectively called a request) to be printed by a line printer. 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 ID with each request and prints it on the standard output.  This ID can be used later to cancel (see cancel) or find the status (see lpstat(1)) of the request.

The following options to lp may appear in any order and may be intermixed with file names:

−c Make copies of the files to be printed immediately when lp is invoked.  Normally, files will be linked into a spool directory.  Ownership and mode of the linked files remains unchanged.  If the −c option is given or linking is not possible then files are copied, in which case the ownership and mode are set to allow read access to owner lp and group bin only.  It should be noted that 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.  The standard input is always copied instead of linked. 

−ddest Choose dest as the printer or class of printers that is 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 (printer unavailability, file space limitation, etc.), requests for specific destinations may not be accepted (see accept(1M) and lpstat(1)). 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(1)).

−m Send mail (see mail(1)) after the files have been printed. By default, no mail is sent upon normal completion of the print request.

−nnumber Print number copies (default of 1) of the output. 

−ooption Specify 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 options are valid for printers supported on your system, see the particular model script in /usr/lib/lp/model associated with the specified printer. 

−s Suppress messages from lp such as "request ID is ...". 

−ttitle Print title on the banner page of the output. 

−w Write a message on the user’s terminal after the files have been printed.  If the user is not logged in or the request is going to a remote printer, then mail will be sent instead. 

Cancel cancels line printer requests that were made by the lp command.  At least one id or printer must be specified. 

ids Specify a request id (as returned by lp) for a local printer.  This cancels the associated request even if it is currently printing. Specifying a request id (as returned by lp) for a remote printer cancels the associated request if it is owned by the user, even if it is currently printing.

printers Specify the names of printers (for a complete list, use lpstat(1)). Specifying a local printer cancels the request which is currently printing on that printer. Specifying a remote printer cancels the request which is currently printing on that printer if it is owned by the user. If the −a, −e or the −u option is specified, this option specifies the printer on which to perform the cancel operation. 

−a Remove all requests a user owns on the specified printer (see printers). The owner is determined by the user’s login name and host name on the machine where the lp command was invoked. 

−e Empty the spool queue of all requests for the specified printer (see printers). Only the super-user can use the −e option. 

−i Cancel only local requests. 

−uuser Remove any requests queued belonging to user.  Multiple −u options are allowed.  Only the super-user can use the −u option. 

In any case, the cancellation of a request that is currently printing frees the printer to print its next available request. 

EXAMPLES

Assuming there is an existing Hewlett-Packard 2934A line printer named lp2, configured with the hp2934a model interface program.  This model has the −c option which will cause the printer to print in a compressed mode.  To obtain compressed print on lp2, use the command:

lp  −dlp2  −oc  files

WARNINGS

A remote print request can be canceled only by the user who requested it, and only on the system from which the request was spooled.  If the restrict cancel feature (selected by −orc in lpadmin(1M)) is enabled for the specified printer, a user can only cancel requests owned by the user.

DEPENDENCIES

Series 300 Diskless
In a clustered environment, all printers are attached to the rootserver and all spooling is handled as if the cluster were a single system. Remote spooling applies to spooling from or to machines outside of the cluster.

FILES

/usr/spool/lp/∗

SEE ALSO

enable(1), lpstat(1), mail(1), slp(1), accept(1M), lpadmin(1M), lpsched(1M), mklp(1M), rcancel(1M), rlp(1M), rlpdaemon(1M), rlpstat(1M). 

INTERNATIONAL SUPPORT

8- and 16-bit data, 8-bit file names, messages. 

Hewlett-Packard Company  —  May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026