xref: /freebsd/usr.sbin/lpr/lprm/lprm.1 (revision 8a7b61203704d362cfbc66c00619f51b24106b55)
1dea673e9SRodney W. Grimes.\" Copyright (c) 1983, 1990, 1993
2dea673e9SRodney W. Grimes.\"	The Regents of the University of California.  All rights reserved.
3dea673e9SRodney W. Grimes.\"
4dea673e9SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without
5dea673e9SRodney W. Grimes.\" modification, are permitted provided that the following conditions
6dea673e9SRodney W. Grimes.\" are met:
7dea673e9SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright
8dea673e9SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer.
9dea673e9SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright
10dea673e9SRodney W. Grimes.\"    notice, this list of conditions and the following disclaimer in the
11dea673e9SRodney W. Grimes.\"    documentation and/or other materials provided with the distribution.
12*fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors
13dea673e9SRodney W. Grimes.\"    may be used to endorse or promote products derived from this software
14dea673e9SRodney W. Grimes.\"    without specific prior written permission.
15dea673e9SRodney W. Grimes.\"
16dea673e9SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17dea673e9SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18dea673e9SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19dea673e9SRodney W. Grimes.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20dea673e9SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21dea673e9SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22dea673e9SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23dea673e9SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24dea673e9SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25dea673e9SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26dea673e9SRodney W. Grimes.\" SUCH DAMAGE.
27dea673e9SRodney W. Grimes.\"
28dea673e9SRodney W. Grimes.Dd June 6, 1993
29dea673e9SRodney W. Grimes.Dt LPRM 1
30a4c37c81SRuslan Ermilov.Os
31dea673e9SRodney W. Grimes.Sh NAME
32dea673e9SRodney W. Grimes.Nm lprm
33dea673e9SRodney W. Grimes.Nd remove jobs from the line printer spooling queue
34dea673e9SRodney W. Grimes.Sh SYNOPSIS
35e97407b4SRuslan Ermilov.Nm
36dea673e9SRodney W. Grimes.Op Fl P Ns Ar printer
37dea673e9SRodney W. Grimes.Op Fl
388b5c4af3SRuslan Ermilov.Op job # ...\&
398b5c4af3SRuslan Ermilov.Op Ar user ...\&
40dea673e9SRodney W. Grimes.Sh DESCRIPTION
417f94b8deSPhilippe CharnierThe
427f94b8deSPhilippe Charnier.Nm
437f94b8deSPhilippe Charnierutility will remove a job, or jobs, from a printer's spool queue.
44dea673e9SRodney W. GrimesSince the spooling directory is protected from users, using
459b3fe531SPhilippe Charnier.Nm
46dea673e9SRodney W. Grimesis normally the only method by which a user may remove a job.
47dea673e9SRodney W. GrimesThe owner of a job is determined by the user's login name
48dea673e9SRodney W. Grimesand host name on the machine where the
49dea673e9SRodney W. Grimes.Xr lpr 1
50dea673e9SRodney W. Grimescommand was invoked.
51dea673e9SRodney W. Grimes.Pp
52dea673e9SRodney W. GrimesOptions and arguments:
53dea673e9SRodney W. Grimes.Bl -tag -width indent
54dea673e9SRodney W. Grimes.It Fl P Ns Ar printer
55dea673e9SRodney W. GrimesSpecify the queue associated with a specific
56dea673e9SRodney W. Grimes.Ar printer
57dea673e9SRodney W. Grimes(otherwise the default printer is used).
58dea673e9SRodney W. Grimes.It Fl
59dea673e9SRodney W. GrimesIf a single
60dea673e9SRodney W. Grimes.Sq Fl
61dea673e9SRodney W. Grimesis given,
629b3fe531SPhilippe Charnier.Nm
63dea673e9SRodney W. Grimeswill remove all jobs which a user
6407bfccd7SRuslan Ermilovowns.
6507bfccd7SRuslan ErmilovIf the super-user employs this flag, the spool queue will
66dea673e9SRodney W. Grimesbe emptied entirely.
67dea673e9SRodney W. Grimes.It Ar user
689b3fe531SPhilippe CharnierCause
699b3fe531SPhilippe Charnier.Nm
70dea673e9SRodney W. Grimesto attempt to remove any jobs queued belonging to that user
7107bfccd7SRuslan Ermilov(or users).
7207bfccd7SRuslan ErmilovThis form of invoking
739b3fe531SPhilippe Charnier.Nm
74dea673e9SRodney W. Grimesis useful only to the super-user.
75dea673e9SRodney W. Grimes.It Ar job\ \&#
76dea673e9SRodney W. GrimesA user may dequeue an individual job by specifying its job number.
77dea673e9SRodney W. GrimesThis number may be obtained from the
78dea673e9SRodney W. Grimes.Xr lpq 1
7957e4378bSRuslan Ermilovprogram, e.g.\&
80dea673e9SRodney W. Grimes.Bd -literal -offset indent
81dea673e9SRodney W. Grimes\&% lpq \-l
82dea673e9SRodney W. Grimes
83dea673e9SRodney W. Grimes1st:ken				[job #013ucbarpa]
84dea673e9SRodney W. Grimes	(standard input)	100 bytes
85dea673e9SRodney W. Grimes% lprm 13
86dea673e9SRodney W. Grimes.Ed
87dea673e9SRodney W. Grimes.El
88dea673e9SRodney W. Grimes.Pp
89dea673e9SRodney W. GrimesIf neither arguments or options are given,
909b3fe531SPhilippe Charnier.Nm
91dea673e9SRodney W. Grimeswill delete the currently active job if it is
92dea673e9SRodney W. Grimesowned by the user who invoked
93e97407b4SRuslan Ermilov.Nm .
94dea673e9SRodney W. Grimes.Pp
957f94b8deSPhilippe CharnierThe
967f94b8deSPhilippe Charnier.Nm
977f94b8deSPhilippe Charnierutility announces the names of any files it removes and is silent if
98dea673e9SRodney W. Grimesthere are no jobs in the queue which match the request list.
99dea673e9SRodney W. Grimes.Pp
1007f94b8deSPhilippe CharnierThe
1017f94b8deSPhilippe Charnier.Nm
1027f94b8deSPhilippe Charnierutility will kill off an active daemon, if necessary, before removing
10307bfccd7SRuslan Ermilovany spooling files.
10407bfccd7SRuslan ErmilovIf a daemon is killed, a new one is
105dea673e9SRodney W. Grimesautomatically restarted upon completion of file removals.
106dea673e9SRodney W. Grimes.Sh ENVIRONMENT
107dea673e9SRodney W. GrimesIf the following environment variable exists, it is utilized by
108e97407b4SRuslan Ermilov.Nm .
109dea673e9SRodney W. Grimes.Bl -tag -width PRINTER
110dea673e9SRodney W. Grimes.It Ev PRINTER
111dea673e9SRodney W. GrimesIf the environment variable
112dea673e9SRodney W. Grimes.Ev PRINTER
113dea673e9SRodney W. Grimesexists,
114dea673e9SRodney W. Grimesand a printer has not been specified with the
115dea673e9SRodney W. Grimes.Fl P
116dea673e9SRodney W. Grimesoption,
117dea673e9SRodney W. Grimesthe default printer is assumed from
118dea673e9SRodney W. Grimes.Ev PRINTER .
119dea673e9SRodney W. Grimes.El
120dea673e9SRodney W. Grimes.Sh FILES
121dea673e9SRodney W. Grimes.Bl -tag -width /var/spool/*/lock/ -compact
122dea673e9SRodney W. Grimes.It Pa /etc/printcap
123dea673e9SRodney W. GrimesPrinter characteristics file.
124dea673e9SRodney W. Grimes.It Pa /var/spool/*
125dea673e9SRodney W. GrimesSpooling directories.
126dea673e9SRodney W. Grimes.It Pa /var/spool/*/lock
127dea673e9SRodney W. GrimesLock file used to obtain the pid of the current
128dea673e9SRodney W. Grimesdaemon and the job number of the currently active job.
129dea673e9SRodney W. Grimes.El
13059a3c79dSRuslan Ermilov.Sh DIAGNOSTICS
13159a3c79dSRuslan Ermilov``Permission denied" if the user tries to remove files other than his
13259a3c79dSRuslan Ermilovown.
133dea673e9SRodney W. Grimes.Sh SEE ALSO
134dea673e9SRodney W. Grimes.Xr lpq 1 ,
135bfd34a4aSWolfram Schneider.Xr lpr 1 ,
136dea673e9SRodney W. Grimes.Xr lpd 8
137dea673e9SRodney W. Grimes.Sh HISTORY
138dea673e9SRodney W. GrimesThe
1399b3fe531SPhilippe Charnier.Nm
140dea673e9SRodney W. Grimescommand appeared in
141dea673e9SRodney W. Grimes.Bx 3.0 .
14259a3c79dSRuslan Ermilov.Sh BUGS
14359a3c79dSRuslan ErmilovSince there are race conditions possible in the update of the lock file,
14459a3c79dSRuslan Ermilovthe currently active job may be incorrectly identified.
145