File:  [CSRG BSD Unix] / 43BSDReno / usr.sbin / lpr / lprm / lprm.1
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:57 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43reno
BSD 4.3reno

.\" Copyright (c) 1983, 1990 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms are permitted provided
.\" that: (1) source distributions retain this entire copyright notice and
.\" comment, and (2) distributions including binaries display the following
.\" acknowledgement:  ``This product includes software developed by the
.\" University of California, Berkeley and its contributors'' in the
.\" documentation or other materials provided with the distribution and in
.\" all advertising materials mentioning features or use of this software.
.\" Neither the name of the University nor the names of its contributors may
.\" be used to endorse or promote products derived from this software without
.\" specific prior written permission.
.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\"     @(#)lprm.1	6.5 (Berkeley) 7/24/90
.\"
.Dd July 24, 1990
.Dt LPRM 1
.Os BSD 4.2
.Sh NAME
.Nm lprm
.Nd remove jobs from the line printer spooling queue
.Sh SYNOPSIS
.Nm lprm
.Oo
.Op Fl P Ar printer
.Oo
.Op Fl
.Op job # ...
.Op Ar user ...
.Sh DESCRIPTION
.Nm Lprm
will remove a job, or jobs, from a printer's spool queue.
Since the spooling directory is protected from users, using
.Nm lprm
is normally the only method by which a user may remove a job.
The owner of a job is determined by the user's login name
and host name on the machine where the
.Xr lpr 1
command was invoked.
.Pp
Options and arguments:
.Tw Fl
.Tc Fl P
.Ar printer
.Cx
Specify the queue associated with a specific
.Ar printer
(otherwise the default printer is used).
.Tp Fl
If a single
.Sq Fl
is given,
.Nm lprm
will remove all jobs which a user
owns.  If the super-user employs this flag, the spool queue will
be emptied entirely.
.Tp Ar user
Causes
.Nm lprm
to attempt to remove any jobs queued belonging to that user
(or users).  This form of invoking
.Nm lprm
is useful only to the super-user.
.Tp Ar job\ \&#
A user may dequeue an individual job by specifying its job number.
This number may be obtained from the
.Ar lpq  1
program, e.g.
.Pp
.Ds I
.Cw \&a 1st:standard_input)
.Cl \&% lpq \-l

.Cl 1st:ken\t\t[job #013ucbarpa]
.Cl \t(standard input)	100 bytes
.Cl % lprm 13
.Cw
.De
.Tp
.Pp
If neither arguments or options are given,
.Nm Lprm
will delete the currently active job if it is
owned by the user who invoked
.Nm lprm  .
.Pp
.Nm Lprm
announces the names of any files it removes and is silent if
there are no jobs in the queue which match the request list.
.Pp
.Nm Lprm
will kill off an active daemon, if necessary, before removing
any spooling files.  If a daemon is killed, a new one is
automatically restarted upon completion of file removals.
.Sh ENVIRONMENT
The following environment variable exists, it is utilized by
.Nm lprm .
.Tw Fl
.Tp Ev PRINTER
If the environment variable
.Ev PRINTER
exists,
and a printer has not been specified with the
.Fl P
option,
the default printer is assumed from 
.Ev PRINTER .
.Tp
.Sh FILES
.Dw /var/spool/*/lock/
.Di L
.Dp Pa /etc/printcap
printer characteristics file
.Dp Pa /var/spool/*
spooling directories
.Dp Pa /var/spool/*/lock
lock file used to obtain the pid of the current
daemon and the job number of the currently active job
.Dp
.Sh SEE ALSO
.Xr lpr 1 ,
.Xr lpq 1 ,
.Xr lpd 8
.Sh DIAGNOSTICS
``Permission denied" if the user tries to remove files other than his
own.
.Sh BUGS
Since there are race conditions possible in the update of the lock file,
the currently active job may be incorrectly identified.
.Sh HISTORY
.Nm Lprm
appeared in 3 BSD.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.