manual page first distributed with 4.2BSD
[unix-history] / usr / src / usr.sbin / lpr / lprm / lprm.1
CommitLineData
e3b04285
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
5.\" @(#)lprm.1 5.1 (Berkeley) %G%
6.\"
7.TH LPRM 1 "28 July 1983"
8.UC 5
9.SH NAME
10lprm \- remove jobs from the line printer spooling queue
11.SH SYNOPSIS
12.B lprm
13[
14.BI \-P printer
15] [
16.B \-
17] [
18job # ...
19] [
20user ...
21]
22.SH DESCRIPTION
23.I Lprm
24will remove a job, or jobs, from a printer's spool queue.
25Since the spooling directory is protected from users, using
26.I lprm
27is normally the only method by which a user may remove a job.
28.PP
29.I Lprm
30without any arguments will delete the currently active job if it is
31owned by the user who invoked
32.IR lprm .
33.PP
34If the
35.B \-
36flag is specified,
37.I lprm
38will remove all jobs which a user
39owns. If the super-user employs this flag, the spool queue will
40be emptied entirely. The owner is determined by the user's login name
41and host name on the machine where the
42.I lpr
43command was invoked.
44.PP
45Specifying a user's name, or list of user names, will cause
46.I lprm
47to attempt to remove any jobs queued belonging to that user
48(or users). This form of invoking
49.I lprm
50is useful only to the super-user.
51.PP
52A user may dequeue an individual job by specifying its job number.
53This number may be obtained from the
54.IR lpq (1)
55program, e.g.
56.PP
57.nf
58.in +0.5i
59.ta \w'k0-k9 'u +\w'Type 'u +\w'"/usr/lib/lpd" 'u
60.ta \w'1st: 'u +\w'(standard input) 'u
61% lpq \-l
62
631st: ken [job #013ucbarpa]
64 (standard input) 100 bytes
65% lprm 13
66.in -0.5i
67.fi
68.PP
69.I Lprm
70will announce the names of any files it removes and is silent if
71there are no jobs in the queue which match the request list.
72.PP
73.I Lprm
74will kill off an active daemon, if necessary, before removing
75any spooling files. If a daemon is killed, a new one is
76automatically restarted upon completion of file removals.
77.PP
78The
79.B \-P
80option may be usd to specify the queue associated with a specific
81printer (otherwise the default printer, or the value of the PRINTER
82variable in the environment is used).
83.SH FILES
84.nf
85.ta \w'/usr/spool/*/lock 'u
86/etc/printcap printer characteristics file
87/usr/spool/* spooling directories
88/usr/spool/*/lock lock file used to obtain the pid of the current
89 daemon and the job number of the currently active job
90.fi
91.SH "SEE ALSO"
92lpr(1),
93lpq(1),
94lpd(8)
95.SH DIAGNOSTICS
96``Permission denied" if the user tries to remove files other than his
97own.
98.SH BUGS
99Since there are race conditions possible in the update of the lock file,
100the currently active job may be incorrectly identified.