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