xref: /original-bsd/usr.sbin/lpr/lprm/lprm.1 (revision 6ab384a1)
1.\" Copyright (c) 1983, 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
6.\"     @(#)lprm.1	6.5 (Berkeley) 07/24/90
7.\"
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
16.Oo
17.Op Fl P Ar printer
18.Oo
19.Op Fl
20.Op job # ...
21.Op Ar user ...
22.Sh DESCRIPTION
23.Nm Lprm
24will remove a job, or jobs, from a printer's spool queue.
25Since the spooling directory is protected from users, using
26.Nm lprm
27is normally the only method by which a user may remove a job.
28The owner of a job is determined by the user's login name
29and host name on the machine where the
30.Xr lpr 1
31command was invoked.
32.Pp
33Options and arguments:
34.Tw Fl
35.Tc Fl P
36.Ar printer
37.Cx
38Specify the queue associated with a specific
39.Ar printer
40(otherwise the default printer is used).
41.Tp Fl
42If a single
43.Sq Fl
44is given,
45.Nm lprm
46will remove all jobs which a user
47owns.  If the super-user employs this flag, the spool queue will
48be emptied entirely.
49.Tp Ar user
50Causes
51.Nm lprm
52to attempt to remove any jobs queued belonging to that user
53(or users).  This form of invoking
54.Nm lprm
55is useful only to the super-user.
56.Tp Ar job\ \&#
57A user may dequeue an individual job by specifying its job number.
58This number may be obtained from the
59.Ar lpq  1
60program, e.g.
61.Pp
62.Ds I
63.Cw \&a 1st:standard_input)
64.Cl \&% lpq \-l
65
66.Cl 1st:ken\t\t[job #013ucbarpa]
67.Cl \t(standard input)	100 bytes
68.Cl % lprm 13
69.Cw
70.De
71.Tp
72.Pp
73If neither arguments or options are given,
74.Nm Lprm
75will delete the currently active job if it is
76owned by the user who invoked
77.Nm lprm  .
78.Pp
79.Nm Lprm
80announces the names of any files it removes and is silent if
81there are no jobs in the queue which match the request list.
82.Pp
83.Nm Lprm
84will kill off an active daemon, if necessary, before removing
85any spooling files.  If a daemon is killed, a new one is
86automatically restarted upon completion of file removals.
87.Sh ENVIRONMENT
88The following environment variable exists, it is utilized by
89.Nm lprm .
90.Tw Fl
91.Tp Ev PRINTER
92If the environment variable
93.Ev PRINTER
94exists,
95and a printer has not been specified with the
96.Fl P
97option,
98the default printer is assumed from
99.Ev PRINTER .
100.Tp
101.Sh FILES
102.Dw /var/spool/*/lock/
103.Di L
104.Dp Pa /etc/printcap
105printer characteristics file
106.Dp Pa /var/spool/*
107spooling directories
108.Dp Pa /var/spool/*/lock
109lock file used to obtain the pid of the current
110daemon and the job number of the currently active job
111.Dp
112.Sh SEE ALSO
113.Xr lpr 1 ,
114.Xr lpq 1 ,
115.Xr lpd 8
116.Sh DIAGNOSTICS
117``Permission denied" if the user tries to remove files other than his
118own.
119.Sh BUGS
120Since there are race conditions possible in the update of the lock file,
121the currently active job may be incorrectly identified.
122.Sh HISTORY
123.Nm Lprm
124appeared in 3 BSD.
125