1.\" Copyright (c) 1983, 1990 The Regents of the University of California. 2.\" All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)lpq.1 6.7 (Berkeley) 06/30/90 7.\" 8.Dd 9.Dt LPQ 1 10.Os BSD 4.2 11.Sh NAME 12.Nm lpq 13.Nd spool queue examination program 14.Sh SYNOPSIS 15.Nm lpq 16.Op Fl l 17.Oo 18.Op Fl P Ar printer 19.Oo 20.Op job # ... 21.Op user ... 22.Sh DESCRIPTION 23.Nm lpq 24examines the spooling area used by 25.Xr lpd 8 26for printing files on the line printer, and reports the status of the 27specified jobs or all jobs associated with a user. 28.Nm lpq 29invoked 30without any arguments reports on any jobs currently in the queue. 31.Pp 32Options: 33.Pp 34.Tp Fl P 35Specify a particular printer, otherwise the default 36line printer is used (or the value of the 37.Ev PRINTER 38variable in the 39environment). All other arguments supplied are interpreted as user 40names or job numbers to filter out only those jobs of interest. 41.Tp Fl l 42Information about each of the files comprising the job entry 43is printed. 44Normally, only as much information as will fit on one line is displayed. 45.Tp 46.Pp 47For each job submitted (i.e. invocation of 48.Xr lpr 1 ) 49.Nm lpq 50reports the user's name, current rank in the queue, the 51names of files comprising the job, the job identifier (a number which 52may be supplied to 53.Xr lprm 1 54for removing a specific job), and the total size in bytes. 55Job ordering is dependent on 56the algorithm used to scan the spooling directory and is supposed 57to be FIFO (First in First Out). 58File names comprising a job may be unavailable 59(when 60.Xr lpr 1 61is used as a sink in a pipeline) in which case the file 62is indicated as ``(standard input)". 63.Pp 64If 65.Nm lpq 66warns that there is no daemon present (i.e. due to some malfunction), 67the 68.Xr lpc 8 69command can be used to restart the printer daemon. 70.Sh ENVIRONMENT 71If the following environment variable exists, it is used by 72.Nm lpq : 73.Tw Fl 74.Tp Ev PRINTER 75Specifies an alternate default printer. 76.Tp 77.Sh FILES 78.Dw /usr/share/misc/termcap 79.Di L 80.Dp Pa /usr/share/misc/termcap 81for manipulating the screen for repeated display 82.Dp Pa /etc/printcap 83to determine printer characteristics 84.Dp Pa /var/spool/* 85the spooling directory, as determined from printcap 86.Dp Pa /var/spool/*/cf* 87control files specifying jobs 88.Dp Pa /var/spool/*/lock 89the lock file to obtain the currently active job 90.Dp 91.Sh SEE ALSO 92.Xr lpr 1 , 93.Xr lprm 1 , 94.Xr lpc 8 , 95.Xr lpd 8 96.Sh HISTORY 97.Nm 98appeared in 3 BSD. 99.Sh BUGS 100Due to the dynamic nature of the information in the spooling directory 101lpq may report unreliably. 102Output formatting is sensitive to the line length of the terminal; 103this can results in widely spaced columns. 104.Sh DIAGNOSTICS 105Unable to open various files. The lock file being malformed. Garbage 106files when there is no daemon active, but files in the spooling directory. 107