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