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