1.\" Copyright (c) 1983, 1990 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" %sccs.include.redist.roff% 5.\" 6.\" @(#)lprm.1 6.7 (Berkeley) 05/09/91 7.\" 8.Dd 9.Dt LPRM 1 10.Os BSD 4.2 11.Sh NAME 12.Nm lprm 13.Nd remove jobs from the line printer spooling queue 14.Sh SYNOPSIS 15.Nm lprm 16.Op Fl P Ns Ar printer 17.Op Fl 18.Op job # ... 19.Op Ar user ... 20.Sh DESCRIPTION 21.Nm Lprm 22will remove a job, or jobs, from a printer's spool queue. 23Since the spooling directory is protected from users, using 24.Nm lprm 25is normally the only method by which a user may remove a job. 26The owner of a job is determined by the user's login name 27and host name on the machine where the 28.Xr lpr 1 29command was invoked. 30.Pp 31Options and arguments: 32.Bl -tag -width indent 33.It Fl P Ns Ar printer 34Specify the queue associated with a specific 35.Ar printer 36(otherwise the default printer is used). 37.It Fl 38If a single 39.Sq Fl 40is given, 41.Nm lprm 42will remove all jobs which a user 43owns. If the super-user employs this flag, the spool queue will 44be emptied entirely. 45.It Ar user 46Causes 47.Nm lprm 48to attempt to remove any jobs queued belonging to that user 49(or users). This form of invoking 50.Nm lprm 51is useful only to the super-user. 52.It Ar job\ \&# 53A user may dequeue an individual job by specifying its job number. 54This number may be obtained from the 55.Xr lpq 1 56program, e.g. 57.Pp 58.Bd -literal -offset indent 59\&% lpq \-l 60 611st:ken [job #013ucbarpa] 62 (standard input) 100 bytes 63% lprm 13 64.Ed 65.El 66.Pp 67If neither arguments or options are given, 68.Nm Lprm 69will delete the currently active job if it is 70owned by the user who invoked 71.Nm lprm . 72.Pp 73.Nm Lprm 74announces the names of any files it removes and is silent if 75there are no jobs in the queue which match the request list. 76.Pp 77.Nm Lprm 78will kill off an active daemon, if necessary, before removing 79any spooling files. If a daemon is killed, a new one is 80automatically restarted upon completion of file removals. 81.Sh ENVIRONMENT 82If the following environment variable exists, it is utilized by 83.Nm lprm . 84.Bl -tag -width PRINTER 85.It Ev PRINTER 86If the environment variable 87.Ev PRINTER 88exists, 89and a printer has not been specified with the 90.Fl P 91option, 92the default printer is assumed from 93.Ev PRINTER . 94.El 95.Sh FILES 96.Bl -tag -width /var/spool/*/lock/ -compact 97.It Pa /etc/printcap 98Printer characteristics file. 99.It Pa /var/spool/* 100Spooling directories. 101.It Pa /var/spool/*/lock 102Lock file used to obtain the pid of the current 103daemon and the job number of the currently active job. 104.El 105.Sh SEE ALSO 106.Xr lpr 1 , 107.Xr lpq 1 , 108.Xr lpd 8 109.Sh DIAGNOSTICS 110``Permission denied" if the user tries to remove files other than his 111own. 112.Sh BUGS 113Since there are race conditions possible in the update of the lock file, 114the currently active job may be incorrectly identified. 115.Sh HISTORY 116The 117.Nm lprm 118command appeared in 119.Bx 3.0 . 120