Commit | Line | Data |
---|---|---|
ef1f0408 | 1 | .\" Copyright (c) 1983, 1990 The Regents of the University of California. |
929f44b0 | 2 | .\" All rights reserved. |
e23ccc70 | 3 | .\" |
ef1f0408 | 4 | .\" %sccs.include.redist.man% |
929f44b0 | 5 | .\" |
d0719240 | 6 | .\" @(#)lpq.1 6.9 (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 | |
17 | .Oo | |
18 | .Op Fl P Ar printer | |
19 | .Oo | |
20 | .Op job # ... | |
21 | .Op user ... | |
22 | .Sh DESCRIPTION | |
5325ced3 | 23 | .Nm Lpq |
e23ccc70 | 24 | examines the spooling area used by |
6a55f534 | 25 | .Xr lpd 8 |
e12c31f1 | 26 | for printing files on the line printer, and reports the status of the |
6a55f534 | 27 | specified jobs or all jobs associated with a user. |
5325ced3 | 28 | .Nm Lpq |
6a55f534 CL |
29 | invoked |
30 | without any arguments reports on any jobs currently in the queue. | |
31 | .Pp | |
32 | Options: | |
33 | .Pp | |
5325ced3 | 34 | .Tw Ds |
6a55f534 CL |
35 | .Tp Fl P |
36 | Specify a particular printer, otherwise the default | |
37 | line printer is used (or the value of the | |
38 | .Ev PRINTER | |
39 | variable in the | |
e12c31f1 KB |
40 | environment). All other arguments supplied are interpreted as user |
41 | names or job numbers to filter out only those jobs of interest. | |
6a55f534 CL |
42 | .Tp Fl l |
43 | Information about each of the files comprising the job entry | |
44 | is printed. | |
45 | Normally, only as much information as will fit on one line is displayed. | |
46 | .Tp | |
47 | .Pp | |
48 | For each job submitted (i.e. invocation of | |
49 | .Xr lpr 1 ) | |
50 | .Nm lpq | |
e23ccc70 KM |
51 | reports the user's name, current rank in the queue, the |
52 | names of files comprising the job, the job identifier (a number which | |
53 | may be supplied to | |
6a55f534 | 54 | .Xr lprm 1 |
e23ccc70 | 55 | for removing a specific job), and the total size in bytes. |
e23ccc70 KM |
56 | Job ordering is dependent on |
57 | the algorithm used to scan the spooling directory and is supposed | |
58 | to be FIFO (First in First Out). | |
59 | File names comprising a job may be unavailable | |
60 | (when | |
6a55f534 | 61 | .Xr lpr 1 |
e23ccc70 KM |
62 | is used as a sink in a pipeline) in which case the file |
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 : | |
74 | .Tw Fl | |
75 | .Tp Ev PRINTER | |
76 | Specifies 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 | |
82 | for manipulating the screen for repeated display | |
83 | .Dp Pa /etc/printcap | |
84 | to determine printer characteristics | |
85 | .Dp Pa /var/spool/* | |
86 | the spooling directory, as determined from printcap | |
87 | .Dp Pa /var/spool/*/cf* | |
88 | control files specifying jobs | |
89 | .Dp Pa /var/spool/*/lock | |
90 | the 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 | |
5325ced3 | 98 | .Nm Lpq |
6a55f534 CL |
99 | appeared in 3 BSD. |
100 | .Sh BUGS | |
e23ccc70 KM |
101 | Due to the dynamic nature of the information in the spooling directory |
102 | lpq may report unreliably. | |
103 | Output formatting is sensitive to the line length of the terminal; | |
104 | this can results in widely spaced columns. | |
6a55f534 | 105 | .Sh DIAGNOSTICS |
e23ccc70 KM |
106 | Unable to open various files. The lock file being malformed. Garbage |
107 | files when there is no daemon active, but files in the spooling directory. |