1LPQ(1) General Commands Manual LPQ(1)
2
3
4
6 lpq - spool queue examination program
7
9 lpq [ +[ n ] ] [ -l ] [ -Pprinter ] [ job # ... ] [ user ... ]
10
12 lpq examines the spooling area used by lpd(8) for printing files on the
13 line printer, and reports the status of the specified jobs or all jobs
14 associated with a user. lpq invoked without any arguments reports on
15 any jobs currently in the queue. A -P flag may be used to specify a
16 particular printer, otherwise the default line printer is used (or the
17 value of the PRINTER variable in the environment). If a + argument is
18 supplied, lpq displays the spool queue until it empties. Supplying a
19 number immediately after the + sign indicates that lpq should sleep n
20 seconds in between scans of the queue. All other arguments supplied
21 are interpreted as user names or job numbers to filter out only those
22 jobs of interest.
23
24 For each job submitted (i.e. invocation of lpr(1)) lpq reports the
25 user's name, current rank in the queue, the names of files comprising
26 the job, the job identifier (a number which may be supplied to lprm(1)
27 for removing a specific job), and the total size in bytes. The -l
28 option causes information about each of the files comprising the job to
29 be printed. Normally, only as much information as will fit on one line
30 is displayed. Job ordering is dependent on the algorithm used to scan
31 the spooling directory and is supposed to be FIFO (First in First Out).
32 File names comprising a job may be unavailable (when lpr(1) is used as
33 a sink in a pipeline) in which case the file is indicated as ``(stan‐
34 dard input)".
35
36 If lpq warns that there is no daemon present (i.e. due to some malfunc‐
37 tion), the lpc(8) command can be used to restart the printer daemon.
38
40 /etc/termcap for manipulating the screen for repeated display
41 /etc/printcap to determine printer characteristics
42 /usr/spool/* the spooling directory, as determined from printcap
43 /usr/spool/*/cf* control files specifying jobs
44 /usr/spool/*/lock the lock file to obtain the currently active job
45
47 lpr(1), lprm(1), lpc(8), lpd(8)
48
50 Due to the dynamic nature of the information in the spooling directory
51 lpq may report unreliably. Output formatting is sensitive to the line
52 length of the terminal; this can results in widely spaced columns.
53
55 Unable to open various files. The lock file being malformed. Garbage
56 files when there is no daemon active, but files in the spooling direc‐
57 tory.
58
59
60
614.2 Berkeley Distribution June 5, 1986 LPQ(1)