161843Sbostic.\" Copyright (c) 1983, 1991, 1993 261843Sbostic.\" The Regents of the University of California. All rights reserved. 318981Smckusick.\" 443830Strent.\" %sccs.include.redist.man% 518981Smckusick.\" 6*69027Stef.\" @(#)lpc.8 8.5 (Berkeley) 04/28/95 735749Sbostic.\" 847469Scael.Dd 947469Scael.Dt LPC 8 1047469Scael.Os BSD 4.2 1147469Scael.Sh NAME 1247469Scael.Nm lpc 1347469Scael.Nd line printer control program 1447469Scael.Sh SYNOPSIS 1547469Scael.Nm lpc 1647469Scael.Oo 1747469Scael.Ar command 1847469Scael.Op Ar argument ... 1947469Scael.Oc 2047469Scael.Sh DESCRIPTION 2147469Scael.Nm Lpc 2218981Smckusickis used by the system administrator to control the 2318981Smckusickoperation of the line printer system. 2447469ScaelFor each line printer configured in 2547469Scael.Pa /etc/printcap , 2647469Scael.Nm lpc 2718981Smckusickmay be used to: 2847469Scael.Bl -bullet -offset indent 2947469Scael.It 3018981Smckusickdisable or enable a printer, 3147469Scael.It 3218981Smckusickdisable or enable a printer's spooling queue, 3347469Scael.It 3418981Smckusickrearrange the order of jobs in a spooling queue, 3547469Scael.It 3618981Smckusickfind the status of printers, and their associated 3765104Smckusickspooling queues and printer daemons. 3847469Scael.El 3947469Scael.Pp 4018981SmckusickWithout any arguments, 4147469Scael.Nm lpc 4218981Smckusickwill prompt for commands from the standard input. 4318981SmckusickIf arguments are supplied, 4447469Scael.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 4847469Scael.Nm lpc 4918981Smckusickto read commands from file. 5066989SbosticCommands may be abbreviated; 5118981Smckusickthe following is the list of recognized commands. 5247469Scael.Pp 5347469Scael.Bl -tag -width Ds -compact 5447469Scael.It Ic \&? No [ command ... ] 5547469Scael.It Ic help No [ command ... ] 5618981SmckusickPrint a short description of each command specified in the argument list, 5765104Smckusickor, if no argument is given, a list of the recognized commands. 5847469Scael.Pp 5947469Scael.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 6247469Scael.Xr lpr ) 6318981Smckusickfor the specified printers. 6447469Scael.Pp 6547469Scael.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. 6947469Scael.Pp 7047469Scael.It Ic disable No {\ all\ |\ printer\ } 7118982SmckusickTurn the specified printer queues off. This prevents new 7218982Smckusickprinter jobs from being entered into the queue by 7347469Scael.Xr lpr . 7447469Scael.Pp 7547469Scael.It Ic down No {\ all\ |\ printer\ } message ... 7618982SmckusickTurn the specified printer queue off, disable printing and put 7747469Scael.Em message 7818982Smckusickin the printer status file. The message doesn't need to be quoted, the 7918982Smckusickremaining arguments are treated like 8047469Scael.Xr echo 1 . 8118982SmckusickThis is normally used to take a printer down and let others know why 8247469Scael.Xr lpq 1 8347469Scaelwill indicate the printer is down and print the status message). 8447469Scael.Pp 8547469Scael.It Ic enable No {\ all\ |\ printer\ } 8618981SmckusickEnable spooling on the local queue for the listed printers. 8718981SmckusickThis will allow 8847469Scael.Xr lpr 1 8918981Smckusickto put new jobs in the spool queue. 9047469Scael.Pp 9147469Scael.It Ic exit 9247469Scael.It Ic quit 9318981SmckusickExit from lpc. 9467325Sah.ne 1i 9547469Scael.Pp 9647469Scael.It Ic restart No {\ all\ |\ printer\ } 9718981SmckusickAttempt to start a new printer daemon. 9818981SmckusickThis is useful when some abnormal condition causes the daemon to 9965104Smckusickdie unexpectedly, leaving jobs in the queue. 10047469Scael.Xr Lpq 10118981Smckusickwill report that there is no daemon present when this condition occurs. 10218982SmckusickIf the user is the super-user, 10318982Smckusicktry to abort the current daemon first (i.e., kill and restart a stuck daemon). 10447469Scael.Pp 10547469Scael.It Ic start No {\ all\ |\ printer\ } 10618981SmckusickEnable printing and start a spooling daemon for the listed printers. 10747469Scael.Pp 10847469Scael.It Ic status No {\ all\ |\ printer\ } 10918981SmckusickDisplay the status of daemons and queues on the local machine. 11047469Scael.Pp 11147469Scael.It Ic stop No {\ all\ |\ printer\ } 11218981SmckusickStop a spooling daemon after the current job completes and disable 11318981Smckusickprinting. 11447469Scael.Pp 11547469Scael.It Ic topq No printer\ [\ jobnum\ ...\ ]\ [\ user\ ...\ ] 11618981SmckusickPlace the jobs in the order listed at the top of the printer queue. 11747469Scael.Pp 11847469Scael.It Ic up No {\ all\ |\ printer\ } 11918982SmckusickEnable everything and start a new printer daemon. Undoes the effects of 12047469Scael.Ic down . 12147469Scael.Sh FILES 12247469Scael.Bl -tag -width /var/spool/*/lockx -compact 12347469Scael.It Pa /etc/printcap 12447469Scaelprinter description file 12547469Scael.It Pa /var/spool/* 12647469Scaelspool directories 12747469Scael.It Pa /var/spool/*/lock 12847469Scaellock file for queue control 12947469Scael.El 13047469Scael.Sh SEE ALSO 13147469Scael.Xr lpd 8 , 13247469Scael.Xr lpr 1 , 13347469Scael.Xr lpq 1 , 13447469Scael.Xr lprm 1 , 13547469Scael.Xr printcap 5 13647469Scael.Sh DIAGNOSTICS 13747469Scael.Bl -tag -width Ds 13847469Scael.It Sy "?Ambiguous command" 13966989Sbosticabbreviation matches more than one command 14047469Scael.It Sy "?Invalid command" 14147469Scaelno match was found 14247469Scael.It Sy "?Privileged command" 143*69027Stefyou must be a member of group "operator" or root to execute this command 14447469Scael.El 14547469Scael.Sh HISTORY 14647469ScaelThe 14747469Scael.Nm 14847469Scaelcommand appeared in 14947469Scael.Bx 4.2 . 150