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