1*1d8c2aacSsobrado.\" $OpenBSD: lpc.8,v 1.14 2009/10/29 20:11:09 sobrado Exp $ 2a7643117Smillert.\" $NetBSD: lpc.8,v 1.14 2002/01/19 03:22:19 wiz Exp $ 3cdbdb68aSaaron.\" 4df930be7Sderaadt.\" Copyright (c) 1983, 1991, 1993 5df930be7Sderaadt.\" The Regents of the University of California. All rights reserved. 6df930be7Sderaadt.\" 7df930be7Sderaadt.\" Redistribution and use in source and binary forms, with or without 8df930be7Sderaadt.\" modification, are permitted provided that the following conditions 9df930be7Sderaadt.\" are met: 10df930be7Sderaadt.\" 1. Redistributions of source code must retain the above copyright 11df930be7Sderaadt.\" notice, this list of conditions and the following disclaimer. 12df930be7Sderaadt.\" 2. Redistributions in binary form must reproduce the above copyright 13df930be7Sderaadt.\" notice, this list of conditions and the following disclaimer in the 14df930be7Sderaadt.\" documentation and/or other materials provided with the distribution. 1529295d1cSmillert.\" 3. Neither the name of the University nor the names of its contributors 16df930be7Sderaadt.\" may be used to endorse or promote products derived from this software 17df930be7Sderaadt.\" without specific prior written permission. 18df930be7Sderaadt.\" 19df930be7Sderaadt.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20df930be7Sderaadt.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21df930be7Sderaadt.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22df930be7Sderaadt.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23df930be7Sderaadt.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24df930be7Sderaadt.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25df930be7Sderaadt.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26df930be7Sderaadt.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27df930be7Sderaadt.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28df930be7Sderaadt.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29df930be7Sderaadt.\" SUCH DAMAGE. 30df930be7Sderaadt.\" 313b62b2c3Stholo.\" @(#)lpc.8 8.5 (Berkeley) 4/28/95 32df930be7Sderaadt.\" 33*1d8c2aacSsobrado.Dd $Mdocdate: October 29 2009 $ 34df930be7Sderaadt.Dt LPC 8 35fc8533a3Saaron.Os 36df930be7Sderaadt.Sh NAME 37df930be7Sderaadt.Nm lpc 38df930be7Sderaadt.Nd line printer control program 39df930be7Sderaadt.Sh SYNOPSIS 40df930be7Sderaadt.Nm lpc 41a7643117Smillert.Bk -words 42df930be7Sderaadt.Oo 43df930be7Sderaadt.Ar command 44df930be7Sderaadt.Op Ar argument ... 45df930be7Sderaadt.Oc 46a7643117Smillert.Ek 47df930be7Sderaadt.Sh DESCRIPTION 487d891bd6Saaron.Nm 49df930be7Sderaadtis used by the system administrator to control the 50df930be7Sderaadtoperation of the line printer system. 51df930be7SderaadtFor each line printer configured in 52df930be7Sderaadt.Pa /etc/printcap , 537d891bd6Saaron.Nm 54df930be7Sderaadtmay be used to: 55df930be7Sderaadt.Bl -bullet -offset indent 56df930be7Sderaadt.It 57df930be7Sderaadtdisable or enable a printer, 58df930be7Sderaadt.It 59df930be7Sderaadtdisable or enable a printer's spooling queue, 60df930be7Sderaadt.It 61df930be7Sderaadtrearrange the order of jobs in a spooling queue, 62df930be7Sderaadt.It 63df930be7Sderaadtfind the status of printers, and their associated 64df930be7Sderaadtspooling queues and printer daemons. 65df930be7Sderaadt.El 66df930be7Sderaadt.Pp 67df930be7SderaadtWithout any arguments, 687d891bd6Saaron.Nm 69df930be7Sderaadtwill prompt for commands from the standard input. 70df930be7SderaadtIf arguments are supplied, 717d891bd6Saaron.Nm 72df930be7Sderaadtinterprets the first argument as a command and the remaining 73cdbdb68aSaaronarguments as parameters to the command. 74cdbdb68aSaaronThe standard input may be redirected causing 757d891bd6Saaron.Nm 76df930be7Sderaadtto read commands from file. 77df930be7SderaadtCommands may be abbreviated; 78df930be7Sderaadtthe following is the list of recognized commands. 79df930be7Sderaadt.Pp 80df930be7Sderaadt.Bl -tag -width Ds -compact 81*1d8c2aacSsobrado.It Ic \&? Op Ar command ... 82*1d8c2aacSsobrado.It Ic help Op Ar command ... 83df930be7SderaadtPrint a short description of each command specified in the argument list, 84df930be7Sderaadtor, if no argument is given, a list of the recognized commands. 85df930be7Sderaadt.Pp 86*1d8c2aacSsobrado.It Ic abort No {all | printer ...} 87df930be7SderaadtTerminate an active spooling daemon on the local host immediately and 88df930be7Sderaadtthen disable printing (preventing new daemons from being started by 89a7643117Smillert.Xr lpr 1 ) 90df930be7Sderaadtfor the specified printers. 91df930be7Sderaadt.Pp 92*1d8c2aacSsobrado.It Ic clean No {all | printer ...} 93df930be7SderaadtRemove any temporary files, data files, and control files that cannot 94df930be7Sderaadtbe printed (i.e., do not form a complete printer job) 95df930be7Sderaadtfrom the specified printer queue(s) on the local machine. 96df930be7Sderaadt.Pp 97*1d8c2aacSsobrado.It Ic disable No {all | printer ...} 98cdbdb68aSaaronTurn the specified printer queues off. 99cdbdb68aSaaronThis prevents new printer jobs from being entered into the queue by 100a7643117Smillert.Xr lpr 1 . 101df930be7Sderaadt.Pp 102*1d8c2aacSsobrado.It Xo Ic down No {all | printer} 103*1d8c2aacSsobrado.Op Ar message ... 104fc8533a3Saaron.Xc 105df930be7SderaadtTurn the specified printer queue off, disable printing and put 106df930be7Sderaadt.Em message 107cdbdb68aSaaronin the printer status file. 108cdbdb68aSaaronThe message doesn't need to be quoted, the 109df930be7Sderaadtremaining arguments are treated like 110df930be7Sderaadt.Xr echo 1 . 1116468ba68SmillertThis is normally used to take a printer down and let users know why. 112df930be7Sderaadt.Xr lpq 1 113fc8533a3Saaronwill indicate the printer is down and print the status message. 114df930be7Sderaadt.Pp 115*1d8c2aacSsobrado.It Ic enable No {all | printer ...} 116df930be7SderaadtEnable spooling on the local queue for the listed printers. 117df930be7SderaadtThis will allow 118df930be7Sderaadt.Xr lpr 1 119df930be7Sderaadtto put new jobs in the spool queue. 120df930be7Sderaadt.Pp 121df930be7Sderaadt.It Ic exit 122df930be7Sderaadt.It Ic quit 1237d891bd6SaaronExit from 1247d891bd6Saaron.Nm lpc . 125df930be7Sderaadt.Pp 126*1d8c2aacSsobrado.It Ic restart No {all | printer ...} 127df930be7SderaadtAttempt to start a new printer daemon. 128df930be7SderaadtThis is useful when some abnormal condition causes the daemon to 129df930be7Sderaadtdie unexpectedly, leaving jobs in the queue. 130a7643117Smillert.Xr lpq 1 131df930be7Sderaadtwill report that there is no daemon present when this condition occurs. 132a3542fadSaaronIf the user is the superuser, 133df930be7Sderaadttry to abort the current daemon first (i.e., kill and restart a stuck daemon). 134df930be7Sderaadt.Pp 135*1d8c2aacSsobrado.It Ic start No {all | printer ...} 136df930be7SderaadtEnable printing and start a spooling daemon for the listed printers. 137df930be7Sderaadt.Pp 138*1d8c2aacSsobrado.It Ic status No {all | printer ...} 139df930be7SderaadtDisplay the status of daemons and queues on the local machine. 140df930be7Sderaadt.Pp 141*1d8c2aacSsobrado.It Ic stop No {all | printer ...} 142df930be7SderaadtStop a spooling daemon after the current job completes and disable 143df930be7Sderaadtprinting. 144df930be7Sderaadt.Pp 145*1d8c2aacSsobrado.It Xo Ic topq No printer 146*1d8c2aacSsobrado.Op Ar jobnum ... 147*1d8c2aacSsobrado.Op Ar user ... 148*1d8c2aacSsobrado.Xc 149df930be7SderaadtPlace the jobs in the order listed at the top of the printer queue. 150df930be7Sderaadt.Pp 151*1d8c2aacSsobrado.It Ic up No {all | printer ...} 152cdbdb68aSaaronEnable everything and start a new printer daemon. 153cdbdb68aSaaronUndoes the effects of 154df930be7Sderaadt.Ic down . 15592698011Saaron.El 156df930be7Sderaadt.Sh FILES 157a7643117Smillert.Bl -tag -width /var/spool/output/*/lock -compact 158df930be7Sderaadt.It Pa /etc/printcap 159df930be7Sderaadtprinter description file 160a7643117Smillert.It Pa /var/spool/output/* 161df930be7Sderaadtspool directories 162a7643117Smillert.It Pa /var/spool/output/*/lock 163df930be7Sderaadtlock file for queue control 164df930be7Sderaadt.El 165df930be7Sderaadt.Sh DIAGNOSTICS 166df930be7Sderaadt.Bl -tag -width Ds 167df930be7Sderaadt.It Sy "?Ambiguous command" 168fc8533a3SaaronAbbreviation matches more than one command. 169df930be7Sderaadt.It Sy "?Invalid command" 170fc8533a3SaaronNo match was found. 171df930be7Sderaadt.It Sy "?Privileged command" 172fc8533a3SaaronYou must be a member of group 173fc8533a3Saaron.Dq operator 174fc8533a3Saaronor user 175fc8533a3Saaron.Dq root 176fc8533a3Saaronto execute this command. 177df930be7Sderaadt.El 178a7643117Smillert.Sh SEE ALSO 179a7643117Smillert.Xr lpq 1 , 180a7643117Smillert.Xr lpr 1 , 181a7643117Smillert.Xr lprm 1 , 182a7643117Smillert.Xr printcap 5 , 183a7643117Smillert.Xr lpd 8 184df930be7Sderaadt.Sh HISTORY 185df930be7SderaadtThe 186df930be7Sderaadt.Nm 187df930be7Sderaadtcommand appeared in 188df930be7Sderaadt.Bx 4.2 . 189