try to make sure that path-addrs always have <angle brackets>
[unix-history] / usr / src / usr.sbin / lpr / lprm / lprm.1
CommitLineData
c57c6411
KB
1.\" Copyright (c) 1983, 1990, 1993
2.\" The Regents of the University of California. All rights reserved.
e3b04285 3.\"
763b1ce2 4.\" %sccs.include.redist.roff%
929f44b0 5.\"
c57c6411 6.\" @(#)lprm.1 8.1 (Berkeley) %G%
e3b04285 7.\"
5325ced3
CL
8.Dd
9.Dt LPRM 1
10.Os BSD 4.2
11.Sh NAME
12.Nm lprm
13.Nd remove jobs from the line printer spooling queue
14.Sh SYNOPSIS
15.Nm lprm
763b1ce2 16.Op Fl P Ns Ar printer
5325ced3
CL
17.Op Fl
18.Op job # ...
19.Op Ar user ...
20.Sh DESCRIPTION
21.Nm Lprm
e3b04285
KM
22will remove a job, or jobs, from a printer's spool queue.
23Since the spooling directory is protected from users, using
5325ced3 24.Nm lprm
e3b04285 25is normally the only method by which a user may remove a job.
5325ced3 26The owner of a job is determined by the user's login name
e3b04285 27and host name on the machine where the
5325ced3 28.Xr lpr 1
e3b04285 29command was invoked.
5325ced3
CL
30.Pp
31Options and arguments:
763b1ce2
CL
32.Bl -tag -width indent
33.It Fl P Ns Ar printer
5325ced3
CL
34Specify the queue associated with a specific
35.Ar printer
36(otherwise the default printer is used).
763b1ce2 37.It Fl
5325ced3
CL
38If a single
39.Sq Fl
40is given,
41.Nm lprm
42will remove all jobs which a user
43owns. If the super-user employs this flag, the spool queue will
44be emptied entirely.
763b1ce2 45.It Ar user
5325ced3
CL
46Causes
47.Nm lprm
e3b04285
KM
48to attempt to remove any jobs queued belonging to that user
49(or users). This form of invoking
5325ced3 50.Nm lprm
e3b04285 51is useful only to the super-user.
763b1ce2 52.It Ar job\ \&#
e3b04285
KM
53A user may dequeue an individual job by specifying its job number.
54This number may be obtained from the
763b1ce2 55.Xr lpq 1
e3b04285 56program, e.g.
5325ced3 57.Pp
763b1ce2
CL
58.Bd -literal -offset indent
59\&% lpq \-l
e3b04285 60
763b1ce2
CL
611st:ken [job #013ucbarpa]
62 (standard input) 100 bytes
63% lprm 13
64.Ed
65.El
5325ced3
CL
66.Pp
67If neither arguments or options are given,
68.Nm Lprm
69will delete the currently active job if it is
70owned by the user who invoked
71.Nm lprm .
72.Pp
73.Nm Lprm
74announces the names of any files it removes and is silent if
e3b04285 75there are no jobs in the queue which match the request list.
5325ced3
CL
76.Pp
77.Nm Lprm
e3b04285
KM
78will kill off an active daemon, if necessary, before removing
79any spooling files. If a daemon is killed, a new one is
80automatically restarted upon completion of file removals.
5325ced3 81.Sh ENVIRONMENT
763b1ce2 82If the following environment variable exists, it is utilized by
5325ced3 83.Nm lprm .
763b1ce2
CL
84.Bl -tag -width PRINTER
85.It Ev PRINTER
5325ced3
CL
86If the environment variable
87.Ev PRINTER
88exists,
89and a printer has not been specified with the
90.Fl P
91option,
92the default printer is assumed from
93.Ev PRINTER .
763b1ce2 94.El
5325ced3 95.Sh FILES
763b1ce2
CL
96.Bl -tag -width /var/spool/*/lock/ -compact
97.It Pa /etc/printcap
98Printer characteristics file.
99.It Pa /var/spool/*
100Spooling directories.
101.It Pa /var/spool/*/lock
102Lock file used to obtain the pid of the current
103daemon and the job number of the currently active job.
104.El
5325ced3
CL
105.Sh SEE ALSO
106.Xr lpr 1 ,
107.Xr lpq 1 ,
108.Xr lpd 8
109.Sh DIAGNOSTICS
e3b04285
KM
110``Permission denied" if the user tries to remove files other than his
111own.
5325ced3 112.Sh BUGS
e3b04285
KM
113Since there are race conditions possible in the update of the lock file,
114the currently active job may be incorrectly identified.
5325ced3 115.Sh HISTORY
763b1ce2
CL
116The
117.Nm lprm
118command appeared in
119.Bx 3.0 .