1*47469Scael.\" Copyright (c) 1983, 1991 The Regents of the University of California. 235749Sbostic.\" All rights reserved. 318981Smckusick.\" 443830Strent.\" %sccs.include.redist.man% 518981Smckusick.\" 6*47469Scael.\" @(#)lpc.8 6.4 (Berkeley) 03/16/91 735749Sbostic.\" 8*47469Scael.Dd 9*47469Scael.Dt LPC 8 10*47469Scael.Os BSD 4.2 11*47469Scael.Sh NAME 12*47469Scael.Nm lpc 13*47469Scael.Nd line printer control program 14*47469Scael.Sh SYNOPSIS 15*47469Scael.Nm lpc 16*47469Scael.Oo 17*47469Scael.Ar command 18*47469Scael.Op Ar argument ... 19*47469Scael.Oc 20*47469Scael.Sh DESCRIPTION 21*47469Scael.Nm Lpc 2218981Smckusickis used by the system administrator to control the 2318981Smckusickoperation of the line printer system. 24*47469ScaelFor each line printer configured in 25*47469Scael.Pa /etc/printcap , 26*47469Scael.Nm lpc 2718981Smckusickmay be used to: 28*47469Scael.Bl -bullet -offset indent 29*47469Scael.It 3018981Smckusickdisable or enable a printer, 31*47469Scael.It 3218981Smckusickdisable or enable a printer's spooling queue, 33*47469Scael.It 3418981Smckusickrearrange the order of jobs in a spooling queue, 35*47469Scael.It 3618981Smckusickfind the status of printers, and their associated 3718981Smckusickspooling queues and printer dameons. 38*47469Scael.El 39*47469Scael.Pp 4018981SmckusickWithout any arguments, 41*47469Scael.Nm lpc 4218981Smckusickwill prompt for commands from the standard input. 4318981SmckusickIf arguments are supplied, 44*47469Scael.Nm lpc 4518981Smckusickinterprets the first argument as a command and the remaining 4618981Smckusickarguments as parameters to the command. The standard input 4718981Smckusickmay be redirected causing 48*47469Scael.Nm lpc 4918981Smckusickto read commands from file. 5018981SmckusickCommands may be abreviated; 5118981Smckusickthe following is the list of recognized commands. 52*47469Scael.Pp 53*47469Scael.Bl -tag -width Ds -compact 54*47469Scael.It Ic \&? No [ command ... ] 55*47469Scael.It Ic help No [ command ... ] 5618981SmckusickPrint a short description of each command specified in the argument list, 5718981Smckusickor, if no arguments are given, a list of the recognized commands. 58*47469Scael.Pp 59*47469Scael.It Ic abort No {\ all\ |\ printer\ } 6018981SmckusickTerminate an active spooling daemon on the local host immediately and 6118981Smckusickthen disable printing (preventing new daemons from being started by 62*47469Scael.Xr lpr ) 6318981Smckusickfor the specified printers. 64*47469Scael.Pp 65*47469Scael.It Ic clean No {\ all\ |\ printer\ } 6618982SmckusickRemove any temporary files, data files, and control files that cannot 6718982Smckusickbe printed (i.e., do not form a complete printer job) 6818981Smckusickfrom the specified printer queue(s) on the local machine. 69*47469Scael.Pp 70*47469Scael.It Ic disable No {\ all\ |\ printer\ } 7118982SmckusickTurn the specified printer queues off. This prevents new 7218982Smckusickprinter jobs from being entered into the queue by 73*47469Scael.Xr lpr . 74*47469Scael.Pp 75*47469Scael.It Ic down No {\ all\ |\ printer\ } message ... 7618982SmckusickTurn the specified printer queue off, disable printing and put 77*47469Scael.Em message 7818982Smckusickin the printer status file. The message doesn't need to be quoted, the 7918982Smckusickremaining arguments are treated like 80*47469Scael.Xr echo 1 . 8118982SmckusickThis is normally used to take a printer down and let others know why 82*47469Scael.Xr lpq 1 83*47469Scaelwill indicate the printer is down and print the status message). 84*47469Scael.Pp 85*47469Scael.It Ic enable No {\ all\ |\ printer\ } 8618981SmckusickEnable spooling on the local queue for the listed printers. 8718981SmckusickThis will allow 88*47469Scael.Xr lpr 1 8918981Smckusickto put new jobs in the spool queue. 90*47469Scael.Pp 91*47469Scael.It Ic exit 92*47469Scael.It Ic quit 9318981SmckusickExit from lpc. 94*47469Scael.Pp 95*47469Scael.It Ic restart No {\ all\ |\ printer\ } 9618981SmckusickAttempt to start a new printer daemon. 9718981SmckusickThis is useful when some abnormal condition causes the daemon to 9818981Smckusickdie unexpectedly leaving jobs in the queue. 99*47469Scael.Xr Lpq 10018981Smckusickwill report that there is no daemon present when this condition occurs. 10118982SmckusickIf the user is the super-user, 10218982Smckusicktry to abort the current daemon first (i.e., kill and restart a stuck daemon). 103*47469Scael.Pp 104*47469Scael.It Ic start No {\ all\ |\ printer\ } 10518981SmckusickEnable printing and start a spooling daemon for the listed printers. 106*47469Scael.Pp 107*47469Scael.It Ic status No {\ all\ |\ printer\ } 10818981SmckusickDisplay the status of daemons and queues on the local machine. 109*47469Scael.Pp 110*47469Scael.It Ic stop No {\ all\ |\ printer\ } 11118981SmckusickStop a spooling daemon after the current job completes and disable 11218981Smckusickprinting. 113*47469Scael.Pp 114*47469Scael.It Ic topq No printer\ [\ jobnum\ ...\ ]\ [\ user\ ...\ ] 11518981SmckusickPlace the jobs in the order listed at the top of the printer queue. 116*47469Scael.Pp 117*47469Scael.It Ic up No {\ all\ |\ printer\ } 11818982SmckusickEnable everything and start a new printer daemon. Undoes the effects of 119*47469Scael.Ic down . 120*47469Scael.Sh FILES 121*47469Scael.Bl -tag -width /var/spool/*/lockx -compact 122*47469Scael.It Pa /etc/printcap 123*47469Scaelprinter description file 124*47469Scael.It Pa /var/spool/* 125*47469Scaelspool directories 126*47469Scael.It Pa /var/spool/*/lock 127*47469Scaellock file for queue control 128*47469Scael.El 129*47469Scael.Sh SEE ALSO 130*47469Scael.Xr lpd 8 , 131*47469Scael.Xr lpr 1 , 132*47469Scael.Xr lpq 1 , 133*47469Scael.Xr lprm 1 , 134*47469Scael.Xr printcap 5 135*47469Scael.Sh DIAGNOSTICS 136*47469Scael.Bl -tag -width Ds 137*47469Scael.It Sy "?Ambiguous command" 138*47469Scaelabreviation matches more than one command 139*47469Scael.It Sy "?Invalid command" 140*47469Scaelno match was found 141*47469Scael.It Sy "?Privileged command" 142*47469Scaelcommand can be executed by root only 143*47469Scael.El 144*47469Scael.Sh HISTORY 145*47469ScaelThe 146*47469Scael.Nm 147*47469Scaelcommand appeared in 148*47469Scael.Bx 4.2 . 149