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