1.\" $NetBSD: lpc.8,v 1.18 2012/04/08 22:00:40 wiz Exp $ 2.\" 3.\" Copyright (c) 1983, 1991, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 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. Neither the name of the University nor the names of its contributors 15.\" may be used to endorse or promote products derived from this software 16.\" without specific prior written permission. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.\" @(#)lpc.8 8.5 (Berkeley) 4/28/95 31.\" 32.Dd April 28, 1995 33.Dt LPC 8 34.Os 35.Sh NAME 36.Nm lpc 37.Nd line printer control program 38.Sh SYNOPSIS 39.Nm 40.Op Ar command Op Ar argument ... 41.Sh DESCRIPTION 42.Nm 43is used by the system administrator to control the 44operation of the line printer system. 45For each line printer configured in 46.Pa /etc/printcap , 47.Nm 48may be used to: 49.Bl -bullet -offset indent 50.It 51disable or enable a printer, 52.It 53disable or enable a printer's spooling queue, 54.It 55rearrange the order of jobs in a spooling queue, 56.It 57find the status of printers, and their associated 58spooling queues and printer daemons. 59.El 60.Pp 61Without any arguments, 62.Nm 63will prompt for commands from the standard input. 64If arguments are supplied, 65.Nm 66interprets the first argument as a command and the remaining 67arguments as parameters to the command. 68The standard input 69may be redirected causing 70.Nm 71to read commands from file. 72Commands may be abbreviated; 73the following is the list of recognized commands. 74.Pp 75.Bl -tag -width Ds -compact 76.It Ic \&? No [ command ... ] 77.It Ic help No [ command ... ] 78Print a short description of each command specified in the argument list, 79or, if no argument is given, a list of the recognized commands. 80.Pp 81.It Ic abort No {\ all\ |\ printer\ } 82Terminate an active spooling daemon on the local host immediately and 83then disable printing (preventing new daemons from being started by 84.Xr lpr 1 ) 85for the specified printers. 86.Pp 87.It Ic clean No {\ all\ |\ printer\ } 88Remove any temporary files, data files, and control files that cannot 89be printed (i.e., do not form a complete printer job) 90from the specified printer queue(s) on the local machine. 91.Pp 92.It Ic disable No {\ all\ |\ printer\ } 93Turn the specified printer queues off. 94This prevents new 95printer jobs from being entered into the queue by 96.Xr lpr 1 . 97.Pp 98.It Ic down No {\ all\ |\ printer\ } message ... 99Turn the specified printer queue off, disable printing and put 100.Em message 101in the printer status file. 102The message doesn't need to be quoted, the 103remaining arguments are treated like 104.Xr echo 1 . 105This is normally used to take a printer down and let others know why 106.Xr lpq 1 107will indicate the printer is down and print the status message. 108.Pp 109.It Ic enable No {\ all\ |\ printer\ } 110Enable spooling on the local queue for the listed printers. 111This will allow 112.Xr lpr 1 113to put new jobs in the spool queue. 114.Pp 115.It Ic exit 116.It Ic quit 117Exit from lpc. 118.Pp 119.It Ic restart No {\ all\ |\ printer\ } 120Attempt to start a new printer daemon. 121This is useful when some abnormal condition causes the daemon to 122die unexpectedly, leaving jobs in the queue. 123.Xr lpq 1 124will report that there is no daemon present when this condition occurs. 125If the user is the super-user, 126try to abort the current daemon first (i.e., kill and restart a stuck daemon). 127.Pp 128.It Ic start No {\ all\ |\ printer\ } 129Enable printing and start a spooling daemon for the listed printers. 130.Pp 131.It Ic status No {\ all\ |\ printer\ } 132Display the status of daemons and queues on the local machine. 133.Pp 134.It Ic stop No {\ all\ |\ printer\ } 135Stop a spooling daemon after the current job completes and disable 136printing. 137.Pp 138.It Ic topq No printer\ [\ jobnum\ ...\ ]\ [\ user\ ...\ ] 139Place the jobs in the order listed at the top of the printer queue. 140.Pp 141.It Ic up No {\ all\ |\ printer\ } 142Enable everything and start a new printer daemon. 143Undoes the effects of 144.Ic down . 145.El 146.Sh FILES 147.Bl -tag -width /var/spool/output/*/lock -compact 148.It Pa /etc/printcap 149printer description file 150.It Pa /var/spool/output/* 151spool directories 152.It Pa /var/spool/output/*/lock 153lock file for queue control 154.El 155.Sh DIAGNOSTICS 156.Bl -tag -width Ds 157.It Sy "?Ambiguous command" 158abbreviation matches more than one command 159.It Sy "?Invalid command" 160no match was found 161.It Sy "?Privileged command" 162you must be a member of group "operator" or root to execute this command 163.El 164.Sh SEE ALSO 165.Xr lpq 1 , 166.Xr lpr 1 , 167.Xr lprm 1 , 168.Xr printcap 5 , 169.Xr lpd 8 170.Sh HISTORY 171The 172.Nm 173command appeared in 174.Bx 4.2 . 175