~ubuntu-branches/ubuntu/hoary/lpr/hoary

« back to all changes in this revision

Viewing changes to lprm/lprm.1

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-03-15 14:54:38 UTC
  • Revision ID: james.westby@ubuntu.com-20030315145438-3n1sxzrmv1g34n4t
Tags: upstream-2000.05.07
ImportĀ upstreamĀ versionĀ 2000.05.07

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\"     $OpenBSD: lprm.1,v 1.6 2000/03/19 17:57:07 aaron Exp $
 
2
.\"
 
3
.\" Copyright (c) 1983, 1990, 1993
 
4
.\"     The Regents of the University of California.  All rights reserved.
 
5
.\"
 
6
.\" Redistribution and use in source and binary forms, with or without
 
7
.\" modification, are permitted provided that the following conditions
 
8
.\" are met:
 
9
.\" 1. Redistributions of source code must retain the above copyright
 
10
.\"    notice, this list of conditions and the following disclaimer.
 
11
.\" 2. Redistributions in binary form must reproduce the above copyright
 
12
.\"    notice, this list of conditions and the following disclaimer in the
 
13
.\"    documentation and/or other materials provided with the distribution.
 
14
.\" 3. All advertising materials mentioning features or use of this software
 
15
.\"    must display the following acknowledgement:
 
16
.\"     This product includes software developed by the University of
 
17
.\"     California, Berkeley and its contributors.
 
18
.\" 4. Neither the name of the University nor the names of its contributors
 
19
.\"    may be used to endorse or promote products derived from this software
 
20
.\"    without specific prior written permission.
 
21
.\"
 
22
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 
23
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 
24
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 
25
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 
26
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 
27
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 
28
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 
29
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 
30
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 
31
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 
32
.\" SUCH DAMAGE.
 
33
.\"
 
34
.\"     @(#)lprm.1      8.1 (Berkeley) 6/6/93
 
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 lprm
 
44
.Op Fl P Ns Ar printer
 
45
.Op Fl
 
46
.Op Ar job# Ar ...
 
47
.Op Ar user Ar ...
 
48
.Sh DESCRIPTION
 
49
.Nm lprm
 
50
will remove a job, or jobs, from a printer's spool queue.
 
51
Since the spooling directory is protected from users, using
 
52
.Nm lprm
 
53
is normally the only method by which a user may remove a job.
 
54
The owner of a job is determined by the user's login name
 
55
and host name on the machine where the
 
56
.Xr lpr 1
 
57
command was invoked.
 
58
.Pp
 
59
Options and arguments:
 
60
.Bl -tag -width indent
 
61
.It Fl P Ns Ar printer
 
62
Specify the queue associated with a specific
 
63
.Ar printer
 
64
(otherwise the default printer is used).
 
65
.It Fl
 
66
If a single
 
67
.Dq Fl
 
68
is given,
 
69
.Nm lprm
 
70
will remove all jobs which a user
 
71
owns.
 
72
If the superuser employs this flag, the spool queue will
 
73
be emptied entirely.
 
74
.It Ar user
 
75
Causes
 
76
.Nm lprm
 
77
to attempt to remove any jobs queued belonging to that user
 
78
(or users).
 
79
This form of invoking
 
80
.Nm lprm
 
81
is useful only to the superuser.
 
82
.It Ar job\ \&#
 
83
A user may dequeue an individual job by specifying its job number.
 
84
This number may be obtained from the
 
85
.Xr lpq 1
 
86
program, e.g.,
 
87
.Pp
 
88
.Bd -literal -offset indent
 
89
\&% lpq \-l
 
90
 
 
91
1st:ken                         [job #013ucbarpa]
 
92
        (standard input)        100 bytes
 
93
% lprm 13
 
94
.Ed
 
95
.El
 
96
.Pp
 
97
If neither arguments or options are given,
 
98
.Nm lprm
 
99
will delete the currently active job if it is
 
100
owned by the user who invoked
 
101
.Nm lprm .
 
102
.Pp
 
103
.Nm lprm
 
104
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
.Nm lprm
 
108
will kill off an active daemon, if necessary, before removing
 
109
any spooling files.
 
110
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 lprm :
 
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 SEE ALSO
 
137
.Xr lpq 1 ,
 
138
.Xr lpr 1 ,
 
139
.Xr lpd 8
 
140
.Sh DIAGNOSTICS
 
141
.Bl -tag -width Ds
 
142
.It Sy Permission denied
 
143
Printed if the user tries to remove files other than his own.
 
144
.El
 
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.
 
148
.Sh HISTORY
 
149
The
 
150
.Nm lprm
 
151
command appeared in
 
152
.Bx 3.0 .