[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 3

lprm Command

Purpose

Removes jobs from the line printer spooling queue.

Syntax

lprm [ -P Printer ] [ JobNumber ] [ UserName ... ] [ - ]

Description

The lprm command removes one or more jobs from the spool queue of a printer.

You cannot run the lprm command without specifying a job number, the - (minus sign) flag, or at least one user name.

Specifying a UserName parameter, or list of names, causes the lprm command to attempt to remove any jobs queued belonging to that user (or users).

You can remove an individual job from a queue by specifying its JobNumber. This job number is obtained by using the lpq command.

Flags

- Removes all jobs a user owns. Someone with root user authority can use this flag to remove all jobs from a queue. This flag is not valid for remote print.
-P Printer Specifies the queue associated with a specific Printer variable. If this flag is not specified, the following conditions occur:
  • If the LPDEST environment variable is set, then lprm uses the value specified by the LPDEST variable. If set, this value is always used, even if the PRINTER variable is also set.
  • If the PRINTER variable is set and no LPDEST variable is set, then lprm uses the value specified by the PRINTER environment variable.

If neither the LPDEST nor the PRINTER variable is set, the lprm command removes jobs from the default queue.

Note: Any destination command line options override both the LPDEST and the PRINTER environment variables.

Examples

  1. To remove job number 13 from the default printer queue, enter:
    lprm 13
  2. To remove job number 13 from printer queue lp0, enter:
    lprm -P lp0 13
  3. To remove a job from the printer queue for a certain user, enter:
    lprm guest

Files

/usr/bin/lprm Contains the lprm command.
/etc/qconfig Contains the configuration file.

Related Information

The lpq command, lpr command, qcan command.

Canceling a Print Job (qcan Command) in AIX Version 4.3 System User's Guide: Operating System and Devices.


[ Previous | Next | Contents | Glossary | Home | Search ]