1dea673e9SRodney W. Grimes.\" Copyright (c) 1983, 1991, 1993 2dea673e9SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 3dea673e9SRodney W. Grimes.\" 4dea673e9SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 5dea673e9SRodney W. Grimes.\" modification, are permitted provided that the following conditions 6dea673e9SRodney W. Grimes.\" are met: 7dea673e9SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 8dea673e9SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 9dea673e9SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 10dea673e9SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 11dea673e9SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 12*fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors 13dea673e9SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 14dea673e9SRodney W. Grimes.\" without specific prior written permission. 15dea673e9SRodney W. Grimes.\" 16dea673e9SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 17dea673e9SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18dea673e9SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19dea673e9SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 20dea673e9SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21dea673e9SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22dea673e9SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23dea673e9SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24dea673e9SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25dea673e9SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26dea673e9SRodney W. Grimes.\" SUCH DAMAGE. 27dea673e9SRodney W. Grimes.\" 28dd8faa9fSGarance A Drosehn.Dd July 16, 2002 29dea673e9SRodney W. Grimes.Dt LPC 8 3011bccf34SRuslan Ermilov.Os 31dea673e9SRodney W. Grimes.Sh NAME 32dea673e9SRodney W. Grimes.Nm lpc 33dea673e9SRodney W. Grimes.Nd line printer control program 34dea673e9SRodney W. Grimes.Sh SYNOPSIS 35e97407b4SRuslan Ermilov.Nm 36610a5778SRuslan Ermilov.Op Ar command Op Ar argument ... 37dea673e9SRodney W. Grimes.Sh DESCRIPTION 38490d5836SPhilippe CharnierThe 39490d5836SPhilippe Charnier.Nm 40490d5836SPhilippe Charnierutility is used by the system administrator to control the 41dea673e9SRodney W. Grimesoperation of the line printer system. 42dea673e9SRodney W. GrimesFor each line printer configured in 43dea673e9SRodney W. Grimes.Pa /etc/printcap , 44e97407b4SRuslan Ermilov.Nm 45dea673e9SRodney W. Grimesmay be used to: 46dea673e9SRodney W. Grimes.Bl -bullet -offset indent 47dea673e9SRodney W. Grimes.It 48dea673e9SRodney W. Grimesdisable or enable a printer, 49dea673e9SRodney W. Grimes.It 50dea673e9SRodney W. Grimesdisable or enable a printer's spooling queue, 51dea673e9SRodney W. Grimes.It 52dea673e9SRodney W. Grimesrearrange the order of jobs in a spooling queue, 53dea673e9SRodney W. Grimes.It 54dea673e9SRodney W. Grimesfind the status of printers, and their associated 5554032d11SGarance A Drosehnspooling queues and printer daemons, 5654032d11SGarance A Drosehn.It 5754032d11SGarance A Drosehnchange the status message for printer queues (the status message 5854032d11SGarance A Drosehnmay be seen by users as part of the output of the 59c041c1e0SRuslan Ermilov.Xr lpq 1 60c041c1e0SRuslan Ermilovutility). 61dea673e9SRodney W. Grimes.El 62dea673e9SRodney W. Grimes.Pp 63dea673e9SRodney W. GrimesWithout any arguments, 649b3fe531SPhilippe Charnier.Nm 65dea673e9SRodney W. Grimeswill prompt for commands from the standard input. 66dea673e9SRodney W. GrimesIf arguments are supplied, 679b3fe531SPhilippe Charnier.Nm 68dea673e9SRodney W. Grimesinterprets the first argument as a command and the remaining 6911bccf34SRuslan Ermilovarguments as parameters to the command. 7011bccf34SRuslan ErmilovThe standard input 71dea673e9SRodney W. Grimesmay be redirected causing 729b3fe531SPhilippe Charnier.Nm 73dea673e9SRodney W. Grimesto read commands from file. 74dea673e9SRodney W. GrimesCommands may be abbreviated; 75dea673e9SRodney W. Grimesthe following is the list of recognized commands. 76dea673e9SRodney W. Grimes.Pp 77610a5778SRuslan Ermilov.Bl -tag -width indent -compact 78610a5778SRuslan Ermilov.It Ic \&? Op Ar command ... 79610a5778SRuslan Ermilov.It Ic help Op Ar command ... 80dea673e9SRodney W. GrimesPrint a short description of each command specified in the argument list, 81dea673e9SRodney W. Grimesor, if no argument is given, a list of the recognized commands. 82dea673e9SRodney W. Grimes.Pp 8311bccf34SRuslan Ermilov.It Ic abort Brq Cm all | Ar printer 84dea673e9SRodney W. GrimesTerminate an active spooling daemon on the local host immediately and 85dea673e9SRodney W. Grimesthen disable printing (preventing new daemons from being started by 86edf0e5b3SMike Pritchard.Xr lpr 1 ) 87dea673e9SRodney W. Grimesfor the specified printers. 88dea673e9SRodney W. Grimes.Pp 89c041c1e0SRuslan Ermilov.It Ic bottomq Ar printer Op Ar jobspec ... 90dd8faa9fSGarance A DrosehnTake the specified jobs in the order specified and move them to the 91dd8faa9fSGarance A Drosehnbottom of the printer queue. 92dd8faa9fSGarance A DrosehnEach 93dd8faa9fSGarance A Drosehn.Ar jobspec 94dd8faa9fSGarance A Drosehncan match multiple print jobs. 95dd8faa9fSGarance A DrosehnThe full description of a 96dd8faa9fSGarance A Drosehn.Ar jobspec 97dd8faa9fSGarance A Drosehnis given below. 98dd8faa9fSGarance A Drosehn.Pp 9911bccf34SRuslan Ermilov.It Ic clean Brq Cm all | Ar printer 100dea673e9SRodney W. GrimesRemove any temporary files, data files, and control files that cannot 101dea673e9SRodney W. Grimesbe printed (i.e., do not form a complete printer job) 102dea673e9SRodney W. Grimesfrom the specified printer queue(s) on the local machine. 10311bccf34SRuslan ErmilovThis command will also look for 10411bccf34SRuslan Ermilov.Pa core 10511bccf34SRuslan Ermilovfiles in spool directory 106004c9c5dSGarance A Drosehnfor each printer queue, and list any that are found. 10711bccf34SRuslan ErmilovIt will not remove any 10811bccf34SRuslan Ermilov.Pa core 10911bccf34SRuslan Ermilovfiles. 11011bccf34SRuslan ErmilovSee also the 111004c9c5dSGarance A Drosehn.Ic tclean 112004c9c5dSGarance A Drosehncommand. 113dea673e9SRodney W. Grimes.Pp 11411bccf34SRuslan Ermilov.It Ic disable Brq Cm all | Ar printer 11511bccf34SRuslan ErmilovTurn the specified printer queues off. 11611bccf34SRuslan ErmilovThis prevents new 117dea673e9SRodney W. Grimesprinter jobs from being entered into the queue by 118edf0e5b3SMike Pritchard.Xr lpr 1 . 119dea673e9SRodney W. Grimes.Pp 1205b1c34fbSGarance A Drosehn.It Ic down Bro Cm all | Ar printer ... Brc Cm -msg Ar message ... 12111bccf34SRuslan Ermilov.It Ic down Bro Cm all | Ar printer Brc Ar message ... 122dea673e9SRodney W. GrimesTurn the specified printer queue off, disable printing and put 123610a5778SRuslan Ermilov.Ar message 124f2e366a1SSheldon Hearnin the printer status file. 1255b1c34fbSGarance A DrosehnWhen specifying more than one printer queue, the 1265b1c34fbSGarance A Drosehn.Ic -msg 1275b1c34fbSGarance A Drosehnargument is required to separate the list of printers from the text 1285b1c34fbSGarance A Drosehnthat will be the new status message. 1290227791bSRuslan ErmilovThe message does not need to be quoted, the 130dea673e9SRodney W. Grimesremaining arguments are treated like 131dea673e9SRodney W. Grimes.Xr echo 1 . 132e2e04619SGarance A DrosehnThis is normally used to take a printer down, and let other users 133e2e04619SGarance A Drosehnfind out why it is down (the 134dea673e9SRodney W. Grimes.Xr lpq 1 135e2e04619SGarance A Drosehnutility will indicate that the printer is down and will print the 136e2e04619SGarance A Drosehnstatus message). 137dea673e9SRodney W. Grimes.Pp 13811bccf34SRuslan Ermilov.It Ic enable Brq Cm all | Ar printer 139dea673e9SRodney W. GrimesEnable spooling on the local queue for the listed printers. 140dea673e9SRodney W. GrimesThis will allow 141dea673e9SRodney W. Grimes.Xr lpr 1 142dea673e9SRodney W. Grimesto put new jobs in the spool queue. 143dea673e9SRodney W. Grimes.Pp 144dea673e9SRodney W. Grimes.It Ic exit 145dea673e9SRodney W. Grimes.It Ic quit 146610a5778SRuslan ErmilovExit from 147610a5778SRuslan Ermilov.Nm . 148dea673e9SRodney W. Grimes.Pp 14911bccf34SRuslan Ermilov.It Ic restart Brq Cm all | Ar printer 150dea673e9SRodney W. GrimesAttempt to start a new printer daemon. 151dea673e9SRodney W. GrimesThis is useful when some abnormal condition causes the daemon to 152dea673e9SRodney W. Grimesdie unexpectedly, leaving jobs in the queue. 153610a5778SRuslan Ermilov.Xr lpq 1 154dea673e9SRodney W. Grimeswill report that there is no daemon present when this condition occurs. 155dea673e9SRodney W. GrimesIf the user is the super-user, 156dea673e9SRodney W. Grimestry to abort the current daemon first (i.e., kill and restart a stuck daemon). 157dea673e9SRodney W. Grimes.Pp 15854032d11SGarance A Drosehn.It Ic setstatus Bro Cm all | Ar printer Brc Cm -msg Ar message ... 15954032d11SGarance A DrosehnSet the status message for the specified printers. 16054032d11SGarance A DrosehnThe 16154032d11SGarance A Drosehn.Ic -msg 16254032d11SGarance A Drosehnargument is required to separate the list of printers from the text 16354032d11SGarance A Drosehnthat will be the new status message. 16454032d11SGarance A DrosehnThis is normally used to change the status message when the printer 16554032d11SGarance A Drosehnqueue is no longer active after printing has been disabled, and you 16654032d11SGarance A Drosehnwant to change what users will see in the output of the 1672bae9428SRuslan Ermilov.Xr lpq 1 1682bae9428SRuslan Ermilovutility. 16954032d11SGarance A Drosehn.Pp 17011bccf34SRuslan Ermilov.It Ic start Brq Cm all | Ar printer 171dea673e9SRodney W. GrimesEnable printing and start a spooling daemon for the listed printers. 172dea673e9SRodney W. Grimes.Pp 17311bccf34SRuslan Ermilov.It Ic status Brq Cm all | Ar printer 174dea673e9SRodney W. GrimesDisplay the status of daemons and queues on the local machine. 175dea673e9SRodney W. Grimes.Pp 17611bccf34SRuslan Ermilov.It Ic stop Brq Cm all | Ar printer 177dea673e9SRodney W. GrimesStop a spooling daemon after the current job completes and disable 178dea673e9SRodney W. Grimesprinting. 179dea673e9SRodney W. Grimes.Pp 18011bccf34SRuslan Ermilov.It Ic tclean Brq Cm all | Ar printer 181004c9c5dSGarance A DrosehnThis will do a test-run of the 182004c9c5dSGarance A Drosehn.Ic clean 183004c9c5dSGarance A Drosehncommand. 184004c9c5dSGarance A DrosehnAll the same checking is done, but the command will only print out 185004c9c5dSGarance A Drosehnmessages saying what a similar 186004c9c5dSGarance A Drosehn.Ic clean 187004c9c5dSGarance A Drosehncommand would do if the user typed it in. 188004c9c5dSGarance A DrosehnIt will not remove any files. 189004c9c5dSGarance A DrosehnNote that the 190004c9c5dSGarance A Drosehn.Ic clean 191004c9c5dSGarance A Drosehncommand is a privileged command, while the 192004c9c5dSGarance A Drosehn.Ic tclean 193004c9c5dSGarance A Drosehncommand is not restricted. 194004c9c5dSGarance A Drosehn.Pp 195c041c1e0SRuslan Ermilov.It Ic topq Ar printer Op Ar jobspec ... 196dd8faa9fSGarance A DrosehnTake the specified jobs in the order specified and move them to the 197dd8faa9fSGarance A Drosehntop of the printer queue. 198dd8faa9fSGarance A DrosehnEach 199dd8faa9fSGarance A Drosehn.Ar jobspec 200dd8faa9fSGarance A Drosehncan match multiple print jobs. 201dd8faa9fSGarance A DrosehnThe full description of a 202dd8faa9fSGarance A Drosehn.Ar jobspec 203dd8faa9fSGarance A Drosehnis given below. 204dea673e9SRodney W. Grimes.Pp 20511bccf34SRuslan Ermilov.It Ic up Brq Cm all | Ar printer 206f2e366a1SSheldon HearnEnable everything and start a new printer daemon. 207f2e366a1SSheldon HearnUndoes the effects of 208dea673e9SRodney W. Grimes.Ic down . 2098b5c4af3SRuslan Ermilov.El 210dd8faa9fSGarance A Drosehn.Pp 211dd8faa9fSGarance A DrosehnCommands such as 212dd8faa9fSGarance A Drosehn.Ic topq 213dd8faa9fSGarance A Drosehnand 214dd8faa9fSGarance A Drosehn.Ic bottomq 215dd8faa9fSGarance A Drosehncan take one or more 216dd8faa9fSGarance A Drosehn.Ar jobspec 217dd8faa9fSGarance A Drosehnto specify which jobs the command should operate on. 218dd8faa9fSGarance A DrosehnA 219dd8faa9fSGarance A Drosehn.Ar jobspec 220dd8faa9fSGarance A Drosehncan be: 221dd8faa9fSGarance A Drosehn.Bl -bullet 222dd8faa9fSGarance A Drosehn.It 223dd8faa9fSGarance A Drosehna single job number, which will match all jobs in the printer's queue 224c041c1e0SRuslan Ermilovwhich have the same job number. 225c041c1e0SRuslan ErmilovEg: 226dd8faa9fSGarance A Drosehn.Ar 17 , 227dd8faa9fSGarance A Drosehn.It 228dd8faa9fSGarance A Drosehna range of job numbers, which will match all jobs with a number between 229c041c1e0SRuslan Ermilovthe starting and ending job numbers, inclusive. 230c041c1e0SRuslan ErmilovEg: 231dd8faa9fSGarance A Drosehn.Ar 21-32 , 232dd8faa9fSGarance A Drosehn.It 233dd8faa9fSGarance A Drosehna specific userid, which will match all jobs which were sent by that 234c041c1e0SRuslan Ermilovuser. 235c041c1e0SRuslan ErmilovEg: 236dd8faa9fSGarance A Drosehn.Ar jones , 237dd8faa9fSGarance A Drosehn.It 238dd8faa9fSGarance A Drosehna host name, when prefixed by an `@', which will match all jobs in 239c041c1e0SRuslan Ermilovthe queue which were sent from the given host. 240c041c1e0SRuslan ErmilovEg: 241dd8faa9fSGarance A Drosehn.Ar @freebsd.org , 242dd8faa9fSGarance A Drosehn.It 243dd8faa9fSGarance A Drosehna job range and a userid, separated by a `:', which will match all jobs 244c041c1e0SRuslan Ermilovwhich both match the job range and were sent by the specified user. 245c041c1e0SRuslan ErmilovEg: 246dd8faa9fSGarance A Drosehn.Ar jones:17 247dd8faa9fSGarance A Drosehnor 248dd8faa9fSGarance A Drosehn.Ar 21-32:jones , 249dd8faa9fSGarance A Drosehn.It 250dd8faa9fSGarance A Drosehna job range and/or a userid, followed by a host name, which will match 251c041c1e0SRuslan Ermilovall jobs which match all the specified criteria. 252c041c1e0SRuslan ErmilovEg: 253dd8faa9fSGarance A Drosehn.Ar jones@freebsd.org 254dd8faa9fSGarance A Drosehnor 255dd8faa9fSGarance A Drosehn.Ar 21-32@freebsd.org 256dd8faa9fSGarance A Drosehnor 257dd8faa9fSGarance A Drosehn.Ar jones:17@freebsd.org . 258dd8faa9fSGarance A Drosehn.El 259dd8faa9fSGarance A Drosehn.Pp 260dd8faa9fSGarance A DrosehnThe values for userid and host name can also include pattern-matching 261dd8faa9fSGarance A Drosehncharacters, similar to the pattern matching done for filenames in 262dd8faa9fSGarance A Drosehnmost command shells. 263dd8faa9fSGarance A DrosehnNote that if you enter a 264dd8faa9fSGarance A Drosehn.Ic topq 265dd8faa9fSGarance A Drosehnor 266dd8faa9fSGarance A Drosehn.Ic bottomq 267dd8faa9fSGarance A Drosehncommand as parameters on the initial 268dd8faa9fSGarance A Drosehn.Nm 269dd8faa9fSGarance A Drosehncommand, then the shell will expand any pattern-matching characters 270dd8faa9fSGarance A Drosehnthat it can (based on what files in finds in the current directory) 271dd8faa9fSGarance A Drosehnbefore 272dd8faa9fSGarance A Drosehn.Nm 273dd8faa9fSGarance A Drosehnprocesses the command. 274dd8faa9fSGarance A DrosehnIn that case, any parameters which include pattern-matching characters 275dd8faa9fSGarance A Drosehnshould be enclosed in quotes, so that the shell will not try to 276dd8faa9fSGarance A Drosehnexpand them. 277dea673e9SRodney W. Grimes.Sh FILES 278dea673e9SRodney W. Grimes.Bl -tag -width /var/spool/*/lockx -compact 279dea673e9SRodney W. Grimes.It Pa /etc/printcap 280dea673e9SRodney W. Grimesprinter description file 281dea673e9SRodney W. Grimes.It Pa /var/spool/* 282dea673e9SRodney W. Grimesspool directories 283dea673e9SRodney W. Grimes.It Pa /var/spool/*/lock 284dea673e9SRodney W. Grimeslock file for queue control 285dea673e9SRodney W. Grimes.El 286dea673e9SRodney W. Grimes.Sh DIAGNOSTICS 28719ab52cbSDima Dorfman.Bl -diag 28819ab52cbSDima Dorfman.It "?Ambiguous command" 289dea673e9SRodney W. Grimesabbreviation matches more than one command 29019ab52cbSDima Dorfman.It "?Invalid command" 291dea673e9SRodney W. Grimesno match was found 29219ab52cbSDima Dorfman.It "?Privileged command" 2935458e2f4SJoerg Wunschyou must be a member of group "operator" or root to execute this command 294dea673e9SRodney W. Grimes.El 29559a3c79dSRuslan Ermilov.Sh SEE ALSO 29659a3c79dSRuslan Ermilov.Xr lpq 1 , 29759a3c79dSRuslan Ermilov.Xr lpr 1 , 29859a3c79dSRuslan Ermilov.Xr lprm 1 , 29959a3c79dSRuslan Ermilov.Xr printcap 5 , 30059a3c79dSRuslan Ermilov.Xr chkprintcap 8 , 30159a3c79dSRuslan Ermilov.Xr lpd 8 302dea673e9SRodney W. Grimes.Sh HISTORY 303dea673e9SRodney W. GrimesThe 304dea673e9SRodney W. Grimes.Nm 305490d5836SPhilippe Charnierutility appeared in 306dea673e9SRodney W. Grimes.Bx 4.2 . 307