]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - usr.sbin/lpr/lprm/lprm.1
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.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 .\" 4. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)lprm.1      8.1 (Berkeley) 6/6/93
29 .\" $FreeBSD$
30 .\"
31 .Dd June 6, 1993
32 .Dt LPRM 1
33 .Os
34 .Sh NAME
35 .Nm lprm
36 .Nd remove jobs from the line printer spooling queue
37 .Sh SYNOPSIS
38 .Nm
39 .Op Fl P Ns Ar printer
40 .Op Fl
41 .Op job # ...\&
42 .Op Ar user ...\&
43 .Sh DESCRIPTION
44 The
45 .Nm
46 utility will remove a job, or jobs, from a printer's spool queue.
47 Since the spooling directory is protected from users, using
48 .Nm
49 is normally the only method by which a user may remove a job.
50 The owner of a job is determined by the user's login name
51 and host name on the machine where the
52 .Xr lpr 1
53 command was invoked.
54 .Pp
55 Options and arguments:
56 .Bl -tag -width indent
57 .It Fl P Ns Ar printer
58 Specify the queue associated with a specific
59 .Ar printer
60 (otherwise the default printer is used).
61 .It Fl
62 If a single
63 .Sq Fl
64 is given,
65 .Nm
66 will remove all jobs which a user
67 owns.
68 If the super-user employs this flag, the spool queue will
69 be emptied entirely.
70 .It Ar user
71 Cause
72 .Nm
73 to attempt to remove any jobs queued belonging to that user
74 (or users).
75 This form of invoking
76 .Nm
77 is useful only to the super-user.
78 .It Ar job\ \&#
79 A user may dequeue an individual job by specifying its job number.
80 This number may be obtained from the
81 .Xr lpq 1
82 program, e.g.\&
83 .Bd -literal -offset indent
84 \&% lpq \-l
85
86 1st:ken                         [job #013ucbarpa]
87         (standard input)        100 bytes
88 % lprm 13
89 .Ed
90 .El
91 .Pp
92 If neither arguments or options are given,
93 .Nm
94 will delete the currently active job if it is
95 owned by the user who invoked
96 .Nm .
97 .Pp
98 The
99 .Nm
100 utility announces the names of any files it removes and is silent if
101 there are no jobs in the queue which match the request list.
102 .Pp
103 The
104 .Nm
105 utility will kill off an active daemon, if necessary, before removing
106 any spooling files.
107 If a daemon is killed, a new one is
108 automatically restarted upon completion of file removals.
109 .Sh ENVIRONMENT
110 If the following environment variable exists, it is utilized by
111 .Nm .
112 .Bl -tag -width PRINTER
113 .It Ev PRINTER
114 If the environment variable
115 .Ev PRINTER
116 exists,
117 and a printer has not been specified with the
118 .Fl P
119 option,
120 the default printer is assumed from
121 .Ev PRINTER .
122 .El
123 .Sh FILES
124 .Bl -tag -width /var/spool/*/lock/ -compact
125 .It Pa /etc/printcap
126 Printer characteristics file.
127 .It Pa /var/spool/*
128 Spooling directories.
129 .It Pa /var/spool/*/lock
130 Lock file used to obtain the pid of the current
131 daemon and the job number of the currently active job.
132 .El
133 .Sh DIAGNOSTICS
134 ``Permission denied" if the user tries to remove files other than his
135 own.
136 .Sh SEE ALSO
137 .Xr lpq 1 ,
138 .Xr lpr 1 ,
139 .Xr lpd 8
140 .Sh HISTORY
141 The
142 .Nm
143 command appeared in
144 .Bx 3.0 .
145 .Sh BUGS
146 Since there are race conditions possible in the update of the lock file,
147 the currently active job may be incorrectly identified.