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