1 .\" Copyright (c) 1983, 1990, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)lprm.1 8.1 (Berkeley) 6/6/93
40 .Nd remove jobs from the line printer spooling queue
43 .Op Fl P Ns Ar printer
49 will remove a job, or jobs, from a printer's spool queue.
50 Since the spooling directory is protected from users, using
52 is normally the only method by which a user may remove a job.
53 The owner of a job is determined by the user's login name
54 and host name on the machine where the
58 Options and arguments:
59 .Bl -tag -width indent
60 .It Fl P Ns Ar printer
61 Specify the queue associated with a specific
63 (otherwise the default printer is used).
69 will remove all jobs which a user
70 owns. If the super-user employs this flag, the spool queue will
75 to attempt to remove any jobs queued belonging to that user
76 (or users). This form of invoking
78 is useful only to the super-user.
80 A user may dequeue an individual job by specifying its job number.
81 This number may be obtained from the
85 .Bd -literal -offset indent
88 1st:ken [job #013ucbarpa]
89 (standard input) 100 bytes
94 If neither arguments or options are given,
96 will delete the currently active job if it is
97 owned by the user who invoked
101 announces the names of any files it removes and is silent if
102 there are no jobs in the queue which match the request list.
105 will kill off an active daemon, if necessary, before removing
106 any spooling files. If a daemon is killed, a new one is
107 automatically restarted upon completion of file removals.
109 If the following environment variable exists, it is utilized by
111 .Bl -tag -width PRINTER
113 If the environment variable
116 and a printer has not been specified with the
119 the default printer is assumed from
123 .Bl -tag -width /var/spool/*/lock/ -compact
125 Printer characteristics file.
127 Spooling directories.
128 .It Pa /var/spool/*/lock
129 Lock file used to obtain the pid of the current
130 daemon and the job number of the currently active job.
137 ``Permission denied" if the user tries to remove files other than his
140 Since there are race conditions possible in the update of the lock file,
141 the currently active job may be incorrectly identified.