1.\" Copyright (c) 1983, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 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. 19.\" 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 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)lpc.8 8.5 (Berkeley) 4/28/95 33.\" $FreeBSD$ 34.\" 35.Dd April 28, 1995 36.Dt LPC 8 37.Os BSD 4.2 38.Sh NAME 39.Nm lpc 40.Nd line printer control program 41.Sh SYNOPSIS 42.Nm lpc 43.Oo 44.Ar command 45.Op Ar argument ... 46.Oc 47.Sh DESCRIPTION 48.Nm Lpc 49is used by the system administrator to control the 50operation of the line printer system. 51For each line printer configured in 52.Pa /etc/printcap , 53.Nm lpc 54may be used to: 55.Bl -bullet -offset indent 56.It 57disable or enable a printer, 58.It 59disable or enable a printer's spooling queue, 60.It 61rearrange the order of jobs in a spooling queue, 62.It 63find the status of printers, and their associated 64spooling queues and printer daemons. 65.El 66.Pp 67Without any arguments, 68.Nm 69will prompt for commands from the standard input. 70If arguments are supplied, 71.Nm 72interprets the first argument as a command and the remaining 73arguments as parameters to the command. The standard input 74may be redirected causing 75.Nm 76to read commands from file. 77Commands may be abbreviated; 78the following is the list of recognized commands. 79.Pp 80.Bl -tag -width Ds -compact 81.It Ic \&? No [ command ... ] 82.It Ic help No [ command ... ] 83Print a short description of each command specified in the argument list, 84or, if no argument is given, a list of the recognized commands. 85.Pp 86.It Ic abort No {\ all\ |\ printer\ } 87Terminate an active spooling daemon on the local host immediately and 88then disable printing (preventing new daemons from being started by 89.Xr lpr 1 ) 90for the specified printers. 91.Pp 92.It Ic clean No {\ all\ |\ printer\ } 93Remove any temporary files, data files, and control files that cannot 94be printed (i.e., do not form a complete printer job) 95from the specified printer queue(s) on the local machine. 96.Pp 97.It Ic disable No {\ all\ |\ printer\ } 98Turn the specified printer queues off. This prevents new 99printer jobs from being entered into the queue by 100.Xr lpr 1 . 101.Pp 102.It Ic down No {\ all\ |\ printer\ } message ... 103Turn the specified printer queue off, disable printing and put 104.Em message 105in the printer status file. 106The message doesn't need to be quoted, the 107remaining arguments are treated like 108.Xr echo 1 . 109This is normally used to take a printer down and let others know why 110.Xr lpq 1 111will indicate the printer is down and print the status message). 112.Pp 113.It Ic enable No {\ all\ |\ printer\ } 114Enable spooling on the local queue for the listed printers. 115This will allow 116.Xr lpr 1 117to put new jobs in the spool queue. 118.Pp 119.It Ic exit 120.It Ic quit 121Exit from lpc. 122.\" ne 1i 123.Pp 124.It Ic restart No {\ all\ |\ printer\ } 125Attempt to start a new printer daemon. 126This is useful when some abnormal condition causes the daemon to 127die unexpectedly, leaving jobs in the queue. 128.Xr Lpq 1 129will report that there is no daemon present when this condition occurs. 130If the user is the super-user, 131try to abort the current daemon first (i.e., kill and restart a stuck daemon). 132.Pp 133.It Ic start No {\ all\ |\ printer\ } 134Enable printing and start a spooling daemon for the listed printers. 135.Pp 136.It Ic status No {\ all\ |\ printer\ } 137Display the status of daemons and queues on the local machine. 138.Pp 139.It Ic stop No {\ all\ |\ printer\ } 140Stop a spooling daemon after the current job completes and disable 141printing. 142.Pp 143.It Ic topq No printer\ [\ jobnum\ ...\ ]\ [\ user\ ...\ ] 144Place the jobs in the order listed at the top of the printer queue. 145.Pp 146.It Ic up No {\ all\ |\ printer\ } 147Enable everything and start a new printer daemon. 148Undoes the effects of 149.Ic down . 150.Sh FILES 151.Bl -tag -width /var/spool/*/lockx -compact 152.It Pa /etc/printcap 153printer description file 154.It Pa /var/spool/* 155spool directories 156.It Pa /var/spool/*/lock 157lock file for queue control 158.El 159.Sh SEE ALSO 160.Xr lpq 1 , 161.Xr lpr 1 , 162.Xr lprm 1 , 163.Xr printcap 5 , 164.Xr lpd 8 165.Sh DIAGNOSTICS 166.Bl -tag -width Ds 167.It Sy "?Ambiguous command" 168abbreviation matches more than one command 169.It Sy "?Invalid command" 170no match was found 171.It Sy "?Privileged command" 172you must be a member of group "operator" or root to execute this command 173.El 174.Sh HISTORY 175The 176.Nm 177command appeared in 178.Bx 4.2 . 179