Commit | Line | Data |
---|---|---|
e23ccc70 KM |
1 | .\" Copyright (c) 1983 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
e822e279 | 5 | .\" @(#)lpq.1 6.3 (Berkeley) %G% |
e23ccc70 | 6 | .\" |
c4901167 | 7 | .TH LPQ 1 "" |
e23ccc70 KM |
8 | .UC 5 |
9 | .SH NAME | |
10 | lpq \- spool queue examination program | |
11 | .SH SYNOPSIS | |
12 | .B lpq | |
13 | [ +[ n ] ] [ -l ] [ \-Pprinter ] [ job # ... ] [ user ... ] | |
14 | .SH DESCRIPTION | |
15 | .I lpq | |
16 | examines the spooling area used by | |
17 | .IR lpd (8) | |
18 | for printing | |
19 | files on the line printer, and reports the status of the specified jobs or | |
20 | all jobs associated with a user. | |
21 | .I lpq | |
22 | invoked without any arguments | |
23 | reports on any jobs currently in the queue. A | |
24 | .B \-P | |
25 | flag may be used | |
26 | to specify a particular printer, otherwise the default line printer | |
27 | is used (or the value of the PRINTER variable in the environment). | |
28 | If a | |
00f19af8 | 29 | .B \(pl |
e23ccc70 KM |
30 | argument is supplied, |
31 | .I lpq | |
32 | displays the spool queue until it empties. Supplying a number | |
33 | immediately after the | |
00f19af8 | 34 | .B \(pl |
e822e279 KB |
35 | sign changes the number of seconds that \fIlpq\fP should sleep inbetween |
36 | scans of the queue, from the default, 30, to \fIn\fP. All other arguments | |
37 | supplied are interpreted as user names or job numbers to filter out only | |
38 | those jobs of interest. | |
e23ccc70 KM |
39 | .PP |
40 | For each job submitted (i.e. invocation of | |
41 | .IR lpr (1)) | |
42 | .I lpq | |
43 | reports the user's name, current rank in the queue, the | |
44 | names of files comprising the job, the job identifier (a number which | |
45 | may be supplied to | |
46 | .IR lprm (1) | |
47 | for removing a specific job), and the total size in bytes. | |
48 | The | |
49 | .B \-l | |
50 | option causes information about each of the files comprising the job | |
51 | to be printed. | |
52 | Normally, only as much information as will fit on one line is displayed. | |
53 | Job ordering is dependent on | |
54 | the algorithm used to scan the spooling directory and is supposed | |
55 | to be FIFO (First in First Out). | |
56 | File names comprising a job may be unavailable | |
57 | (when | |
58 | .IR lpr (1) | |
59 | is used as a sink in a pipeline) in which case the file | |
60 | is indicated as ``(standard input)". | |
61 | .PP | |
62 | If | |
63 | .I lpq | |
64 | warns that there is no daemon present (i.e. due to some malfunction), | |
65 | the | |
66 | .IR lpc (8) | |
67 | command can be used to restart the printer daemon. | |
68 | .SH FILES | |
69 | .nf | |
70 | .ta \w'/etc/termcap 'u | |
71 | /etc/termcap for manipulating the screen for repeated display | |
72 | /etc/printcap to determine printer characteristics | |
73 | /usr/spool/* the spooling directory, as determined from printcap | |
74 | /usr/spool/*/cf* control files specifying jobs | |
75 | /usr/spool/*/lock the lock file to obtain the currently active job | |
76 | .fi | |
77 | .SH "SEE ALSO" | |
78 | lpr(1), | |
79 | lprm(1), | |
80 | lpc(8), | |
81 | lpd(8) | |
82 | .SH BUGS | |
83 | Due to the dynamic nature of the information in the spooling directory | |
84 | lpq may report unreliably. | |
85 | Output formatting is sensitive to the line length of the terminal; | |
86 | this can results in widely spaced columns. | |
87 | .SH DIAGNOSTICS | |
88 | Unable to open various files. The lock file being malformed. Garbage | |
89 | files when there is no daemon active, but files in the spooling directory. |