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. Neither the name of the University nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" @(#)lpc.8 8.5 (Berkeley) 4/28/95
29 .\" $FreeBSD: src/usr.sbin/lpr/lpc/lpc.8,v 1.8.2.13 2003/03/12 22:08:14 trhodes Exp $
30 .\" $DragonFly: src/usr.sbin/lpr/lpc/lpc.8,v 1.3 2006/02/17 19:40:16 swildner Exp $
37 .Nd line printer control program
40 .Op Ar command Op Ar argument ...
44 utility is used by the system administrator to control the
45 operation of the line printer system.
46 For each line printer configured in
50 .Bl -bullet -offset indent
52 disable or enable a printer,
54 disable or enable a printer's spooling queue,
56 rearrange the order of jobs in a spooling queue,
58 find the status of printers, and their associated
59 spooling queues and printer daemons,
61 change the status message for printer queues (the status message
62 may be seen by users as part of the output of the
67 Without any arguments,
69 will prompt for commands from the standard input.
70 If arguments are supplied,
72 interprets the first argument as a command and the remaining
73 arguments as parameters to the command.
75 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 indent -compact
82 .It Ic \&? Op Ar command ...
83 .It Ic help Op Ar command ...
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 Brq Cm all | Ar 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 bottomq Ar printer Op Ar jobspec ...
94 Take the specified jobs in the order specified and move them to the
95 bottom of the printer queue.
98 can match multiple print jobs.
99 The full description of a
103 .It Ic clean Brq Cm all | Ar printer
104 Remove any temporary files, data files, and control files that cannot
105 be printed (i.e., do not form a complete printer job)
106 from the specified printer queue(s) on the local machine.
107 This command will also look for
109 files in spool directory
110 for each printer queue, and list any that are found.
111 It will not remove any
118 .It Ic disable Brq Cm all | Ar printer
119 Turn the specified printer queues off.
121 printer jobs from being entered into the queue by
124 .It Ic down Bro Cm all | Ar printer ... Brc Cm -msg Ar message ...
125 .It Ic down Bro Cm all | Ar printer Brc Ar message ...
126 Turn the specified printer queue off, disable printing and put
128 in the printer status file.
129 When specifying more than one printer queue, the
131 argument is required to separate the list of printers from the text
132 that will be the new status message.
133 The message doesn't need to be quoted, the
134 remaining arguments are treated like
136 This is normally used to take a printer down, and let other users
137 find out why it is down (the
139 utility will indicate that the printer is down and will print the
142 .It Ic enable Brq Cm all | Ar printer
143 Enable spooling on the local queue for the listed printers.
146 to put new jobs in the spool queue.
153 .It Ic restart Brq Cm all | Ar printer
154 Attempt to start a new printer daemon.
155 This is useful when some abnormal condition causes the daemon to
156 die unexpectedly, leaving jobs in the queue.
158 will report that there is no daemon present when this condition occurs.
159 If the user is the super-user,
160 try to abort the current daemon first (i.e., kill and restart a stuck daemon).
162 .It Ic setstatus Bro Cm all | Ar printer Brc Cm -msg Ar message ...
163 Set the status message for the specified printers.
166 argument is required to separate the list of printers from the text
167 that will be the new status message.
168 This is normally used to change the status message when the printer
169 queue is no longer active after printing has been disabled, and you
170 want to change what users will see in the output of the
174 .It Ic start Brq Cm all | Ar printer
175 Enable printing and start a spooling daemon for the listed printers.
177 .It Ic status Brq Cm all | Ar printer
178 Display the status of daemons and queues on the local machine.
180 .It Ic stop Brq Cm all | Ar printer
181 Stop a spooling daemon after the current job completes and disable
184 .It Ic tclean Brq Cm all | Ar printer
185 This will do a test-run of the
188 All the same checking is done, but the command will only print out
189 messages saying what a similar
191 command would do if the user typed it in.
192 It will not remove any files.
195 command is a privileged command, while the
197 command is not restricted.
199 .It Ic topq Ar printer Op Ar jobspec ...
200 Take the specified jobs in the order specified and move them to the
201 top of the printer queue.
204 can match multiple print jobs.
205 The full description of a
209 .It Ic up Brq Cm all | Ar printer
210 Enable everything and start a new printer daemon.
211 Undoes the effects of
221 to specify which jobs the command should operate on.
227 a single job number, which will match all jobs in the printer's queue
228 which have the same job number.
232 a range of job numbers, which will match all jobs with a number between
233 the starting and ending job numbers, inclusive.
237 a specific userid, which will match all jobs which were sent by that
242 a host name, when prefixed by an `@', which will match all jobs in
243 the queue which were sent from the given host.
247 a job range and a userid, separated by a `:', which will match all jobs
248 which both match the job range and were sent by the specified user.
254 a job range and/or a userid, followed by a host name, which will match
255 all jobs which match all the specified criteria.
257 .Ar jones@freebsd.org
259 .Ar 21-32@freebsd.org
261 .Ar jones:17@freebsd.org .
264 The values for userid and host name can also include pattern-matching
265 characters, similar to the pattern matching done for filenames in
267 Note that if you enter a
271 command as parameters on the initial
273 command, then the shell will expand any pattern-matching characters
274 that it can (based on what files in finds in the current directory)
277 processes the command.
278 In that case, any parameters which include pattern-matching characters
279 should be enclosed in quotes, so that the shell will not try to
282 .Bl -tag -width /var/spool/*/lockx -compact
284 printer description file
287 .It Pa /var/spool/*/lock
288 lock file for queue control
292 .It "?Ambiguous command"
293 abbreviation matches more than one command
294 .It "?Invalid command"
296 .It "?Privileged command"
297 you must be a member of group "operator" or root to execute this command