LPRM(1) BSD LPRM(1)
NAME
lprm - remove jobs from the line-printer spooling queue
SYNOPSIS
lprm [ -Pprinter ] [ - ] [ job ... ]
lprm username ...
DESCRIPTION
lprm removes jobs from a printer's spool queue. Since the spooling
directory is protected from users, lprm is normally the only method you
can use to remove a job.
lprm without any arguments deletes the currently active job if it is
owned by the user who invoked lprm. It announces the names of any files
it removes and is silent if no jobs in the queue match the request list.
lprm kills off an active daemon, if necessary, before removing any
spooling files. If a daemon is killed, a new one is automatically
restarted upon completion of file removals.
OPTIONS
-Pprinter Remove jobs from the queue associated with the specified
printer (otherwise the default printer, or the value of the
PRINTER variable in the environment is used).
- Remove all jobs in the queue which you own. If the super-user
employs this flag, the spool queue is emptied entirely. The
owner is determined by the user's log-in name and host name on
the machine where the lpr command was invoked.
job Remove an individual job, specified by its job number. You can
obtain this number from the lpq(1) program.
username Specifying a username, or a list of usernames, causes lprm to
attempt to remove any jobs queued belonging to that user (or
users). This form of invoking lprm is useful only to the
super-user.
EXAMPLE
The following example illustrates how to find out a file's job number,
and remove the file.
% lpq -l
1st: ken [job #013ucbarpa]
(standard input) 100 bytes
% lprm 13
FILES
/etc/printcap Printer characteristics file
/usr/spool/* Spooling directories
/usr/spool/*/lock Lock file used to obtain the PID of the current
server and the number of the currently active job
DIAGNOSTICS
"Permission denied" if you try to remove files other than your own.
BUGS
Since there are race conditions possible in the update of the lock file,
the currently active job may be incorrectly identified.
SEE ALSO
lpr(1), lpq(1), prf(1), lpd(8)