Commit | Line | Data |
---|---|---|
ad787160 C |
1 | .\" Copyright (c) 1983, 1990, 1993 |
2 | .\" The Regents of the University of California. All rights reserved. | |
e23ccc70 | 3 | .\" |
ad787160 C |
4 | .\" Redistribution and use in source and binary forms, with or without |
5 | .\" modification, are permitted provided that the following conditions | |
6 | .\" are met: | |
7 | .\" 1. Redistributions of source code must retain the above copyright | |
8 | .\" notice, this list of conditions and the following disclaimer. | |
9 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
10 | .\" notice, this list of conditions and the following disclaimer in the | |
11 | .\" documentation and/or other materials provided with the distribution. | |
12 | .\" 3. All advertising materials mentioning features or use of this software | |
13 | .\" must display the following acknowledgement: | |
14 | .\" This product includes software developed by the University of | |
15 | .\" California, Berkeley and its contributors. | |
16 | .\" 4. Neither the name of the University nor the names of its contributors | |
17 | .\" may be used to endorse or promote products derived from this software | |
18 | .\" without specific prior written permission. | |
929f44b0 | 19 | .\" |
ad787160 C |
20 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
30 | .\" SUCH DAMAGE. | |
e23ccc70 | 31 | .\" |
fd88f5c5 | 32 | .\" @(#)lpq.1 8.2 (Berkeley) 4/28/95 |
ad787160 | 33 | .\" |
fd88f5c5 | 34 | .Dd April 28, 1995 |
6a55f534 CL |
35 | .Dt LPQ 1 |
36 | .Os BSD 4.2 | |
37 | .Sh NAME | |
38 | .Nm lpq | |
39 | .Nd spool queue examination program | |
40 | .Sh SYNOPSIS | |
41 | .Nm lpq | |
3333c35e | 42 | .OP Fl a |
6a55f534 | 43 | .Op Fl l |
763b1ce2 | 44 | .Op Fl P Ns Ar printer |
6a55f534 CL |
45 | .Op job # ... |
46 | .Op user ... | |
47 | .Sh DESCRIPTION | |
5325ced3 | 48 | .Nm Lpq |
e23ccc70 | 49 | examines the spooling area used by |
6a55f534 | 50 | .Xr lpd 8 |
e12c31f1 | 51 | for printing files on the line printer, and reports the status of the |
6a55f534 | 52 | specified jobs or all jobs associated with a user. |
5325ced3 | 53 | .Nm Lpq |
6a55f534 CL |
54 | invoked |
55 | without any arguments reports on any jobs currently in the queue. | |
56 | .Pp | |
57 | Options: | |
58 | .Pp | |
763b1ce2 CL |
59 | .Bl -tag -width indent |
60 | .It Fl P | |
6a55f534 CL |
61 | Specify a particular printer, otherwise the default |
62 | line printer is used (or the value of the | |
63 | .Ev PRINTER | |
64 | variable in the | |
e12c31f1 KB |
65 | environment). All other arguments supplied are interpreted as user |
66 | names or job numbers to filter out only those jobs of interest. | |
763b1ce2 | 67 | .It Fl l |
6a55f534 CL |
68 | Information about each of the files comprising the job entry |
69 | is printed. | |
70 | Normally, only as much information as will fit on one line is displayed. | |
3333c35e TF |
71 | .It Fl a |
72 | Report on the local queues for all printers, | |
73 | rather than just the specified printer. | |
763b1ce2 | 74 | .El |
6a55f534 CL |
75 | .Pp |
76 | For each job submitted (i.e. invocation of | |
77 | .Xr lpr 1 ) | |
78 | .Nm lpq | |
e23ccc70 KM |
79 | reports the user's name, current rank in the queue, the |
80 | names of files comprising the job, the job identifier (a number which | |
81 | may be supplied to | |
6a55f534 | 82 | .Xr lprm 1 |
e23ccc70 | 83 | for removing a specific job), and the total size in bytes. |
e23ccc70 KM |
84 | Job ordering is dependent on |
85 | the algorithm used to scan the spooling directory and is supposed | |
763b1ce2 CL |
86 | to be |
87 | .Tn FIFO | |
88 | (First in First Out). | |
e23ccc70 KM |
89 | File names comprising a job may be unavailable |
90 | (when | |
6a55f534 | 91 | .Xr lpr 1 |
e23ccc70 | 92 | is used as a sink in a pipeline) in which case the file |
763b1ce2 | 93 | is indicated as ``(standard input)''. |
6a55f534 | 94 | .Pp |
e23ccc70 | 95 | If |
6a55f534 | 96 | .Nm lpq |
e23ccc70 KM |
97 | warns that there is no daemon present (i.e. due to some malfunction), |
98 | the | |
6a55f534 | 99 | .Xr lpc 8 |
e23ccc70 | 100 | command can be used to restart the printer daemon. |
6a55f534 CL |
101 | .Sh ENVIRONMENT |
102 | If the following environment variable exists, it is used by | |
103 | .Nm lpq : | |
763b1ce2 CL |
104 | .Bl -tag -width PRINTER |
105 | .It Ev PRINTER | |
6a55f534 | 106 | Specifies an alternate default printer. |
763b1ce2 | 107 | .El |
6a55f534 | 108 | .Sh FILES |
3333c35e | 109 | .Bl -tag -width "/var/spool/*/lock" -compact |
763b1ce2 CL |
110 | .It Pa /etc/printcap |
111 | To determine printer characteristics. | |
112 | .It Pa /var/spool/* | |
113 | The spooling directory, as determined from printcap. | |
114 | .It Pa /var/spool/*/cf* | |
115 | Control files specifying jobs. | |
116 | .It Pa /var/spool/*/lock | |
117 | The lock file to obtain the currently active job. | |
763b1ce2 | 118 | .El |
6a55f534 CL |
119 | .Sh SEE ALSO |
120 | .Xr lpr 1 , | |
121 | .Xr lprm 1 , | |
122 | .Xr lpc 8 , | |
123 | .Xr lpd 8 | |
124 | .Sh HISTORY | |
5325ced3 | 125 | .Nm Lpq |
763b1ce2 CL |
126 | appeared in |
127 | .Bx 3 . | |
6a55f534 | 128 | .Sh BUGS |
e23ccc70 | 129 | Due to the dynamic nature of the information in the spooling directory |
763b1ce2 CL |
130 | .Nm lpq |
131 | may report unreliably. | |
e23ccc70 KM |
132 | Output formatting is sensitive to the line length of the terminal; |
133 | this can results in widely spaced columns. | |
6a55f534 | 134 | .Sh DIAGNOSTICS |
e23ccc70 KM |
135 | Unable to open various files. The lock file being malformed. Garbage |
136 | files when there is no daemon active, but files in the spooling directory. |