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