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.8 (Berkeley) 07/24/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.Tw Ds 35.Tp Fl P 36Specify a particular printer, otherwise the default 37line printer is used (or the value of the 38.Ev PRINTER 39variable in the 40environment). All other arguments supplied are interpreted as user 41names or job numbers to filter out only those jobs of interest. 42.Tp Fl l 43Information about each of the files comprising the job entry 44is printed. 45Normally, only as much information as will fit on one line is displayed. 46.Tp 47.Pp 48For each job submitted (i.e. invocation of 49.Xr lpr 1 ) 50.Nm lpq 51reports the user's name, current rank in the queue, the 52names of files comprising the job, the job identifier (a number which 53may be supplied to 54.Xr lprm 1 55for removing a specific job), and the total size in bytes. 56Job ordering is dependent on 57the algorithm used to scan the spooling directory and is supposed 58to be FIFO (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.Tw Fl 75.Tp Ev PRINTER 76Specifies an alternate default printer. 77.Tp 78.Sh FILES 79.Dw /usr/share/misc/termcap 80.Di L 81.Dp Pa /usr/share/misc/termcap 82for manipulating the screen for repeated display 83.Dp Pa /etc/printcap 84to determine printer characteristics 85.Dp Pa /var/spool/* 86the spooling directory, as determined from printcap 87.Dp Pa /var/spool/*/cf* 88control files specifying jobs 89.Dp Pa /var/spool/*/lock 90the lock file to obtain the currently active job 91.Dp 92.Sh SEE ALSO 93.Xr lpr 1 , 94.Xr lprm 1 , 95.Xr lpc 8 , 96.Xr lpd 8 97.Sh HISTORY 98.Nm Lpq 99appeared in 3 BSD. 100.Sh BUGS 101Due to the dynamic nature of the information in the spooling directory 102lpq may report unreliably. 103Output formatting is sensitive to the line length of the terminal; 104this can results in widely spaced columns. 105.Sh DIAGNOSTICS 106Unable to open various files. The lock file being malformed. Garbage 107files when there is no daemon active, but files in the spooling directory. 108