143716Scael.\" Copyright (c) 1983, 1990 The Regents of the University of California. 235749Sbostic.\" All rights reserved. 319726Smckusick.\" 443716Scael.\" %sccs.include.redist.man% 519726Smckusick.\" 6*44722Scael.\" @(#)lpq.1 6.7 (Berkeley) 06/30/90 735749Sbostic.\" 8*44722Scael.Dd 9*44722Scael.Dt LPQ 1 10*44722Scael.Os BSD 4.2 11*44722Scael.Sh NAME 12*44722Scael.Nm lpq 13*44722Scael.Nd spool queue examination program 14*44722Scael.Sh SYNOPSIS 15*44722Scael.Nm lpq 16*44722Scael.Op Fl l 17*44722Scael.Oo 18*44722Scael.Op Fl P Ar printer 19*44722Scael.Oo 20*44722Scael.Op job # ... 21*44722Scael.Op user ... 22*44722Scael.Sh DESCRIPTION 23*44722Scael.Nm lpq 2419726Smckusickexamines the spooling area used by 25*44722Scael.Xr lpd 8 2630997Sbosticfor printing files on the line printer, and reports the status of the 27*44722Scaelspecified jobs or all jobs associated with a user. 28*44722Scael.Nm lpq 29*44722Scaelinvoked 30*44722Scaelwithout any arguments reports on any jobs currently in the queue. 31*44722Scael.Pp 32*44722ScaelOptions: 33*44722Scael.Pp 34*44722Scael.Tp Fl P 35*44722ScaelSpecify a particular printer, otherwise the default 36*44722Scaelline printer is used (or the value of the 37*44722Scael.Ev PRINTER 38*44722Scaelvariable in the 3930997Sbosticenvironment). All other arguments supplied are interpreted as user 4030997Sbosticnames or job numbers to filter out only those jobs of interest. 41*44722Scael.Tp Fl l 42*44722ScaelInformation about each of the files comprising the job entry 43*44722Scaelis printed. 44*44722ScaelNormally, only as much information as will fit on one line is displayed. 45*44722Scael.Tp 46*44722Scael.Pp 47*44722ScaelFor each job submitted (i.e. invocation of 48*44722Scael.Xr lpr 1 ) 49*44722Scael.Nm lpq 5019726Smckusickreports the user's name, current rank in the queue, the 5119726Smckusicknames of files comprising the job, the job identifier (a number which 5219726Smckusickmay be supplied to 53*44722Scael.Xr lprm 1 5419726Smckusickfor removing a specific job), and the total size in bytes. 5519726SmckusickJob ordering is dependent on 5619726Smckusickthe algorithm used to scan the spooling directory and is supposed 5719726Smckusickto be FIFO (First in First Out). 5819726SmckusickFile names comprising a job may be unavailable 5919726Smckusick(when 60*44722Scael.Xr lpr 1 6119726Smckusickis used as a sink in a pipeline) in which case the file 6219726Smckusickis indicated as ``(standard input)". 63*44722Scael.Pp 6419726SmckusickIf 65*44722Scael.Nm lpq 6619726Smckusickwarns that there is no daemon present (i.e. due to some malfunction), 6719726Smckusickthe 68*44722Scael.Xr lpc 8 6919726Smckusickcommand can be used to restart the printer daemon. 70*44722Scael.Sh ENVIRONMENT 71*44722ScaelIf the following environment variable exists, it is used by 72*44722Scael.Nm lpq : 73*44722Scael.Tw Fl 74*44722Scael.Tp Ev PRINTER 75*44722ScaelSpecifies an alternate default printer. 76*44722Scael.Tp 77*44722Scael.Sh FILES 78*44722Scael.Dw /usr/share/misc/termcap 79*44722Scael.Di L 80*44722Scael.Dp Pa /usr/share/misc/termcap 81*44722Scaelfor manipulating the screen for repeated display 82*44722Scael.Dp Pa /etc/printcap 83*44722Scaelto determine printer characteristics 84*44722Scael.Dp Pa /var/spool/* 85*44722Scaelthe spooling directory, as determined from printcap 86*44722Scael.Dp Pa /var/spool/*/cf* 87*44722Scaelcontrol files specifying jobs 88*44722Scael.Dp Pa /var/spool/*/lock 89*44722Scaelthe lock file to obtain the currently active job 90*44722Scael.Dp 91*44722Scael.Sh SEE ALSO 92*44722Scael.Xr lpr 1 , 93*44722Scael.Xr lprm 1 , 94*44722Scael.Xr lpc 8 , 95*44722Scael.Xr lpd 8 96*44722Scael.Sh HISTORY 97*44722Scael.Nm 98*44722Scaelappeared in 3 BSD. 99*44722Scael.Sh BUGS 10019726SmckusickDue to the dynamic nature of the information in the spooling directory 10119726Smckusicklpq may report unreliably. 10219726SmckusickOutput formatting is sensitive to the line length of the terminal; 10319726Smckusickthis can results in widely spaced columns. 104*44722Scael.Sh DIAGNOSTICS 10519726SmckusickUnable to open various files. The lock file being malformed. Garbage 10619726Smckusickfiles when there is no daemon active, but files in the spooling directory. 107