[Previous] [Contents] [Next]

lprm

Remove jobs from the printer queue (UNIX)

Syntax:

lprm [-P name] [-a] [jobnumber...] [user...]

Options:

-a
Remove all jobs owned by the user. If the user is root, then the spool queue will be emptied entirely.
-P name
Use the named spooler and/or queue. If name begins with a slash, it is assumed to be a full name, where the last component is the name of a spool queue and the prefix is the name of the spooler (/spooler/queue). If name does not begin with a slash, it is assumed to be a queue name.

If a server is not specified, the utility will use the spooler identified in the LPSRVR environment variable, or /qnx/spooler if LPSRVR is not set.

If a queue is not specified, lp will use the queue identified in the LPDEST environment variable, or the first queue defined in the setup file of the spooler being used if LPDEST is not set.

For more detailed discussion, see Ch. 9, "Print Spooling" in the QNX Installation & Configuration manual.

jobnumber
user
Specifying either of these causes lprm to filter out only those jobs of interest (i.e. either a specific job, or all the jobs owned by the specified particular user).

Description:

The lprm utility removes a job or jobs from a printer spool queue. If lprm is invoked with no arguments, it will abandon the currently active job, provided the user invoking the lprm utility owns the job or has appropriate privileges.

Specifying user names is useful only to the superuser (root). All other users can remove only their own jobs.

Environment variables:

LPSRVR
Use this spool server by default. (Will use /qnx/spooler if not set.)
LPDEST
Use this spool queue by default. (Will use first queue entry in the setup file of the located spooler if not set.)
PRINTER
Historical alternative to LPDEST. Ignored if LPDEST is set.

Caveats:

With the increasing amount of memory built into newer printers, pending jobs may be physically stored within the printer itself, and lprm may not be able to remove them. Once the job has been sent to the printer, it is too late to stop it using lprm.

See also:

lp, lpc, lpq, lpsrvr

TCP/IP lpr* utilities

Installation & Configuration


[Previous] [Contents] [Next]