1
.\" $OpenBSD: lpc.8,v 1.9 2000/04/15 11:45:59 aaron Exp $
3
.\" Copyright (c) 1983, 1991, 1993
4
.\" The Regents of the University of California. All rights reserved.
6
.\" Redistribution and use in source and binary forms, with or without
7
.\" modification, are permitted provided that the following conditions
9
.\" 1. Redistributions of source code must retain the above copyright
10
.\" notice, this list of conditions and the following disclaimer.
11
.\" 2. Redistributions in binary form must reproduce the above copyright
12
.\" notice, this list of conditions and the following disclaimer in the
13
.\" documentation and/or other materials provided with the distribution.
14
.\" 3. All advertising materials mentioning features or use of this software
15
.\" must display the following acknowledgement:
16
.\" This product includes software developed by the University of
17
.\" California, Berkeley and its contributors.
18
.\" 4. Neither the name of the University nor the names of its contributors
19
.\" may be used to endorse or promote products derived from this software
20
.\" without specific prior written permission.
22
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34
.\" @(#)lpc.8 8.5 (Berkeley) 4/28/95
41
.Nd line printer control program
50
is used by the system administrator to control the
51
operation of the line printer system.
52
For each line printer configured in
56
.Bl -bullet -offset indent
58
disable or enable a printer,
60
disable or enable a printer's spooling queue,
62
rearrange the order of jobs in a spooling queue,
64
find the status of printers, and their associated
65
spooling queues and printer daemons.
68
Without any arguments,
70
will prompt for commands from the standard input.
71
If arguments are supplied,
73
interprets the first argument as a command and the remaining
74
arguments as parameters to the command.
75
The standard input may be redirected causing
77
to read commands from file.
78
Commands may be abbreviated;
79
the following is the list of recognized commands.
81
.Bl -tag -width Ds -compact
82
.It Ic \&? No [ Ar command Ar ... ]
83
.It Ic help No [ Ar command Ar ... ]
84
Print a short description of each command specified in the argument list,
85
or, if no argument is given, a list of the recognized commands.
87
.It Ic abort No {\ all\ |\ printer\ }
88
Terminate an active spooling daemon on the local host immediately and
89
then disable printing (preventing new daemons from being started by
91
for the specified printers.
93
.It Ic clean No {\ all\ |\ printer\ }
94
Remove any temporary files, data files, and control files that cannot
95
be printed (i.e., do not form a complete printer job)
96
from the specified printer queue(s) on the local machine.
98
.It Ic disable No {\ all\ |\ printer\ }
99
Turn the specified printer queues off.
100
This prevents new printer jobs from being entered into the queue by
103
.It Xo Ic down No {\ all\ |\ printer\ } Ar message
106
Turn the specified printer queue off, disable printing and put
108
in the printer status file.
109
The message doesn't need to be quoted, the
110
remaining arguments are treated like
112
This is normally used to take a printer down and let others know why
114
will indicate the printer is down and print the status message.
116
.It Ic enable No {\ all\ |\ printer\ }
117
Enable spooling on the local queue for the listed printers.
120
to put new jobs in the spool queue.
127
.It Ic restart No {\ all\ |\ printer\ }
128
Attempt to start a new printer daemon.
129
This is useful when some abnormal condition causes the daemon to
130
die unexpectedly, leaving jobs in the queue.
132
will report that there is no daemon present when this condition occurs.
133
If the user is the superuser,
134
try to abort the current daemon first (i.e., kill and restart a stuck daemon).
136
.It Ic start No {\ all\ |\ printer\ }
137
Enable printing and start a spooling daemon for the listed printers.
139
.It Ic status No {\ all\ |\ printer\ }
140
Display the status of daemons and queues on the local machine.
142
.It Ic stop No {\ all\ |\ printer\ }
143
Stop a spooling daemon after the current job completes and disable
146
.It Ic topq No printer\ [\ jobnum\ ...\ ]\ [\ user\ ...\ ]
147
Place the jobs in the order listed at the top of the printer queue.
149
.It Ic up No {\ all\ |\ printer\ }
150
Enable everything and start a new printer daemon.
151
Undoes the effects of
155
.Bl -tag -width /var/spool/*/lockx -compact
157
printer description file
160
.It Pa /var/spool/*/lock
161
lock file for queue control
171
.It Sy "?Ambiguous command"
172
Abbreviation matches more than one command.
173
.It Sy "?Invalid command"
175
.It Sy "?Privileged command"
176
You must be a member of group
180
to execute this command.