Commit | Line | Data |
---|---|---|
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 |
22 | will remove a job, or jobs, from a printer's spool queue. |
23 | Since the spooling directory is protected from users, using | |
5325ced3 | 24 | .Nm lprm |
e3b04285 | 25 | is normally the only method by which a user may remove a job. |
5325ced3 | 26 | The owner of a job is determined by the user's login name |
e3b04285 | 27 | and host name on the machine where the |
5325ced3 | 28 | .Xr lpr 1 |
e3b04285 | 29 | command was invoked. |
5325ced3 CL |
30 | .Pp |
31 | Options and arguments: | |
763b1ce2 CL |
32 | .Bl -tag -width indent |
33 | .It Fl P Ns Ar printer | |
5325ced3 CL |
34 | Specify the queue associated with a specific |
35 | .Ar printer | |
36 | (otherwise the default printer is used). | |
763b1ce2 | 37 | .It Fl |
5325ced3 CL |
38 | If a single |
39 | .Sq Fl | |
40 | is given, | |
41 | .Nm lprm | |
42 | will remove all jobs which a user | |
43 | owns. If the super-user employs this flag, the spool queue will | |
44 | be emptied entirely. | |
763b1ce2 | 45 | .It Ar user |
5325ced3 CL |
46 | Causes |
47 | .Nm lprm | |
e3b04285 KM |
48 | to attempt to remove any jobs queued belonging to that user |
49 | (or users). This form of invoking | |
5325ced3 | 50 | .Nm lprm |
e3b04285 | 51 | is useful only to the super-user. |
763b1ce2 | 52 | .It Ar job\ \&# |
e3b04285 KM |
53 | A user may dequeue an individual job by specifying its job number. |
54 | This number may be obtained from the | |
763b1ce2 | 55 | .Xr lpq 1 |
e3b04285 | 56 | program, e.g. |
5325ced3 | 57 | .Pp |
763b1ce2 CL |
58 | .Bd -literal -offset indent |
59 | \&% lpq \-l | |
e3b04285 | 60 | |
763b1ce2 CL |
61 | 1st:ken [job #013ucbarpa] |
62 | (standard input) 100 bytes | |
63 | % lprm 13 | |
64 | .Ed | |
65 | .El | |
5325ced3 CL |
66 | .Pp |
67 | If neither arguments or options are given, | |
68 | .Nm Lprm | |
69 | will delete the currently active job if it is | |
70 | owned by the user who invoked | |
71 | .Nm lprm . | |
72 | .Pp | |
73 | .Nm Lprm | |
74 | announces the names of any files it removes and is silent if | |
e3b04285 | 75 | there are no jobs in the queue which match the request list. |
5325ced3 CL |
76 | .Pp |
77 | .Nm Lprm | |
e3b04285 KM |
78 | will kill off an active daemon, if necessary, before removing |
79 | any spooling files. If a daemon is killed, a new one is | |
80 | automatically restarted upon completion of file removals. | |
5325ced3 | 81 | .Sh ENVIRONMENT |
763b1ce2 | 82 | If 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 |
86 | If the environment variable |
87 | .Ev PRINTER | |
88 | exists, | |
89 | and a printer has not been specified with the | |
90 | .Fl P | |
91 | option, | |
92 | the 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 | |
98 | Printer characteristics file. | |
99 | .It Pa /var/spool/* | |
100 | Spooling directories. | |
101 | .It Pa /var/spool/*/lock | |
102 | Lock file used to obtain the pid of the current | |
103 | daemon 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 |
111 | own. | |
5325ced3 | 112 | .Sh BUGS |
e3b04285 KM |
113 | Since there are race conditions possible in the update of the lock file, |
114 | the currently active job may be incorrectly identified. | |
5325ced3 | 115 | .Sh HISTORY |
763b1ce2 CL |
116 | The |
117 | .Nm lprm | |
118 | command appeared in | |
119 | .Bx 3.0 . |