Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ lprm(1B) — SunOS 5.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

lp(1)

lpq(1B)

lpr(1B)

lpsched(1M)

lprm(1B)

NAME

lprm − remove jobs from the printer queue

SYNOPSIS

/usr/ucb/lprm [ −Pprinter ] [ − ] [ job # ... ] [ username ... ]

AVAILABILITY

SUNWscpu

DESCRIPTION

lprm removes a job or jobs from a printer’s spooling queue.  Since the spool directory is protected from users, using lprm is normally the only method by which a user can remove a job. 

Without any arguments, lprm deletes the job that is currently active, provided that the user who invoked lprm owns that job. 

When the privileged user specifies a username, lprm removes all jobs belonging to that user. 

You can remove a specific job by supplying its job number as an argument, which you can obtain using lpq(1B).  For example:

example%  lpq  −Phost
host is ready and printing
Rank Owner   Job     Files   Total Size
active       wendy   385     standard input  35501 bytes
example%  lprm −Phost 385

lprm reports the names of any files it removes, and is silent if there are no applicable jobs to remove. 

lprm Sends the request to cancel a job to the print spooler, LPSCHED. 

OPTIONS

−Pprinter
Specify the queue associated with a specific printer. Otherwise the value of the PRINTER variable in the environment is used.  If the PRINTER variable is not set, and the LPDEST environment variable is not set, the queue for the default printer is used. 

− Remove all jobs owned by you.  If invoked by the privileged user, all jobs in the spool are removed.  Job ownership is determined by the user’s login name and host name on the machine where the lpr command was executed. 

FILES

/var/spool/lp/∗ spooling directories

SEE ALSO

lp(1), lpq(1B), lpr(1B), lpsched(1M)

DIAGNOSTICS

lprm: printer: unknown printer
The printer was not found in the System V LP database.  Usually this is a typing mistake; however, it may indicate that the printer does not exist on the system.  Use ‘lptstat −p’ to find the reason. 

lprm: error on opening queue to spooler
The connection to lpsched on the local machine failed.  This usually means the printer server started at boot time has died or is hung.  Check if the printer spooler daemon /usr/lib/lpsched is running. 

lprm: Can’t send message to the LP print service

lprm: Can’t receive message from the LP print service
These indicate that the LP print service has been stopped.  Get help from the system administrator. 

lprm: Received unexpected message from the LP print service
It is likely there is an error in this software. Get help from system administrator.

lprm: Can’t cancel request
You are not allowed to remove another’s request.

NOTES

An active job may be incorrectly identified for removal by an lprm command issued with no arguments.  During the interval between an lpq(1B) command and the execution of lprm, the next job in queue may have become active; that job may be removed unintentionally if it is owned by you.  To avoid this, supply lprm with the job number to remove when a critical job that you own is next in line. 

Only the privileged user can remove print jobs submitted from another host. 

lp is the preferred interface. 

Sun Microsystems  —  Last change: 14 Sep 1992

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