1 .\" Copyright (c) 1983, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)lpc.8 8.5 (Berkeley) 4/28/95
33 .\" $FreeBSD: src/usr.sbin/lpr/lpc/lpc.8,v 1.8.2.13 2003/03/12 22:08:14 trhodes Exp $
34 .\" $DragonFly: src/usr.sbin/lpr/lpc/lpc.8,v 1.3 2006/02/17 19:40:16 swildner Exp $
41 .Nd line printer control program
44 .Op Ar command Op Ar argument ...
48 utility is used by the system administrator to control the
49 operation of the line printer system.
50 For each line printer configured in
54 .Bl -bullet -offset indent
56 disable or enable a printer,
58 disable or enable a printer's spooling queue,
60 rearrange the order of jobs in a spooling queue,
62 find the status of printers, and their associated
63 spooling queues and printer daemons,
65 change the status message for printer queues (the status message
66 may be seen by users as part of the output of the
71 Without any arguments,
73 will prompt for commands from the standard input.
74 If arguments are supplied,
76 interprets the first argument as a command and the remaining
77 arguments as parameters to the command.
79 may be redirected causing
81 to read commands from file.
82 Commands may be abbreviated;
83 the following is the list of recognized commands.
85 .Bl -tag -width indent -compact
86 .It Ic \&? Op Ar command ...
87 .It Ic help Op Ar command ...
88 Print a short description of each command specified in the argument list,
89 or, if no argument is given, a list of the recognized commands.
91 .It Ic abort Brq Cm all | Ar printer
92 Terminate an active spooling daemon on the local host immediately and
93 then disable printing (preventing new daemons from being started by
95 for the specified printers.
97 .It Ic bottomq Ar printer Op Ar jobspec ...
98 Take the specified jobs in the order specified and move them to the
99 bottom of the printer queue.
102 can match multiple print jobs.
103 The full description of a
107 .It Ic clean Brq Cm all | Ar printer
108 Remove any temporary files, data files, and control files that cannot
109 be printed (i.e., do not form a complete printer job)
110 from the specified printer queue(s) on the local machine.
111 This command will also look for
113 files in spool directory
114 for each printer queue, and list any that are found.
115 It will not remove any
122 .It Ic disable Brq Cm all | Ar printer
123 Turn the specified printer queues off.
125 printer jobs from being entered into the queue by
128 .It Ic down Bro Cm all | Ar printer ... Brc Cm -msg Ar message ...
129 .It Ic down Bro Cm all | Ar printer Brc Ar message ...
130 Turn the specified printer queue off, disable printing and put
132 in the printer status file.
133 When specifying more than one printer queue, the
135 argument is required to separate the list of printers from the text
136 that will be the new status message.
137 The message doesn't need to be quoted, the
138 remaining arguments are treated like
140 This is normally used to take a printer down, and let other users
141 find out why it is down (the
143 utility will indicate that the printer is down and will print the
146 .It Ic enable Brq Cm all | Ar printer
147 Enable spooling on the local queue for the listed printers.
150 to put new jobs in the spool queue.
157 .It Ic restart Brq Cm all | Ar printer
158 Attempt to start a new printer daemon.
159 This is useful when some abnormal condition causes the daemon to
160 die unexpectedly, leaving jobs in the queue.
162 will report that there is no daemon present when this condition occurs.
163 If the user is the super-user,
164 try to abort the current daemon first (i.e., kill and restart a stuck daemon).
166 .It Ic setstatus Bro Cm all | Ar printer Brc Cm -msg Ar message ...
167 Set the status message for the specified printers.
170 argument is required to separate the list of printers from the text
171 that will be the new status message.
172 This is normally used to change the status message when the printer
173 queue is no longer active after printing has been disabled, and you
174 want to change what users will see in the output of the
177 .It Ic start Brq Cm all | Ar printer
178 Enable printing and start a spooling daemon for the listed printers.
180 .It Ic status Brq Cm all | Ar printer
181 Display the status of daemons and queues on the local machine.
183 .It Ic stop Brq Cm all | Ar printer
184 Stop a spooling daemon after the current job completes and disable
187 .It Ic tclean Brq Cm all | Ar printer
188 This will do a test-run of the
191 All the same checking is done, but the command will only print out
192 messages saying what a similar
194 command would do if the user typed it in.
195 It will not remove any files.
198 command is a privileged command, while the
200 command is not restricted.
202 .It Ic topq Ar printer Op Ar jobspec ...
203 Take the specified jobs in the order specified and move them to the
204 top of the printer queue.
207 can match multiple print jobs.
208 The full description of a
212 .It Ic up Brq Cm all | Ar printer
213 Enable everything and start a new printer daemon.
214 Undoes the effects of
224 to specify which jobs the command should operate on.
230 a single job number, which will match all jobs in the printer's queue
231 which have the same job number.
235 a range of job numbers, which will match all jobs with a number between
236 the starting and ending job numbers, inclusive.
240 a specific userid, which will match all jobs which were sent by that
245 a host name, when prefixed by an `@', which will match all jobs in
246 the queue which were sent from the given host.
250 a job range and a userid, separated by a `:', which will match all jobs
251 which both match the job range and were sent by the specified user.
257 a job range and/or a userid, followed by a host name, which will match
258 all jobs which match all the specified criteria.
260 .Ar jones@freebsd.org
262 .Ar 21-32@freebsd.org
264 .Ar jones:17@freebsd.org .
267 The values for userid and host name can also include pattern-matching
268 characters, similar to the pattern matching done for filenames in
270 Note that if you enter a
274 command as parameters on the initial
276 command, then the shell will expand any pattern-matching characters
277 that it can (based on what files in finds in the current directory)
280 processes the command.
281 In that case, any parameters which include pattern-matching characters
282 should be enclosed in quotes, so that the shell will not try to
285 .Bl -tag -width /var/spool/*/lockx -compact
287 printer description file
290 .It Pa /var/spool/*/lock
291 lock file for queue control
295 .It "?Ambiguous command"
296 abbreviation matches more than one command
297 .It "?Invalid command"
299 .It "?Privileged command"
300 you must be a member of group "operator" or root to execute this command