Remove advertising header from man pages.
[dragonfly.git] / usr.sbin / lpr / lpq / lpq.1
1 .\" Copyright (c) 1983, 1990, 1993
2 .\"     The Regents of the University of California.  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 .\" 4. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)lpq.1       8.2 (Berkeley) 4/28/95
29 .\" $FreeBSD: src/usr.sbin/lpr/lpq/lpq.1,v 1.5.2.4 2002/06/21 16:40:46 charnier Exp $
30 .\" $DragonFly: src/usr.sbin/lpr/lpq/lpq.1,v 1.4 2008/05/02 02:05:08 swildner Exp $
31 .\"
32 .Dd April 28, 1995
33 .Dt LPQ 1
34 .Os
35 .Sh NAME
36 .Nm lpq
37 .Nd spool queue examination program
38 .Sh SYNOPSIS
39 .Nm
40 .Op Fl a
41 .Op Fl l
42 .Op Fl P Ns Ar printer
43 .Op  job # ...\&
44 .Op  user ...\&
45 .Sh DESCRIPTION
46 The
47 .Nm
48 utility 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 The
53 .Nm
54 utility invoked
55 without any arguments reports on any jobs currently in the queue.
56 .Pp
57 Options:
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 .It Fl a
71 Report on the local queues for all printers,
72 rather than just the specified printer.
73 .El
74 .Pp
75 For each job submitted (i.e. invocation of
76 .Xr lpr  1  )
77 .Nm
78 reports the user's name, current rank in the queue, the
79 names of files comprising the job, the job identifier (a number which
80 may be supplied to
81 .Xr lprm  1
82 for removing a specific job), and the total size in bytes.
83 Job ordering is dependent on
84 the algorithm used to scan the spooling directory and is supposed
85 to be
86 .Tn FIFO
87 (First in First Out).
88 File names comprising a job may be unavailable
89 (when
90 .Xr lpr  1
91 is used as a sink in a pipeline) in which case the file
92 is indicated as ``(standard input)''.
93 .Pp
94 If
95 .Nm
96 warns that there is no daemon present (i.e. due to some malfunction),
97 the
98 .Xr lpc  8
99 command can be used to restart the printer daemon.
100 .Sh ENVIRONMENT
101 If the following environment variable exists, it is used by
102 .Nm :
103 .Bl -tag -width PRINTER
104 .It Ev PRINTER
105 Specifies an alternate default printer.
106 .El
107 .Sh FILES
108 .Bl -tag -width "/var/spool/*/lock" -compact
109 .It Pa /etc/printcap
110 To determine printer characteristics.
111 .It Pa /var/spool/*
112 The spooling directory, as determined from printcap.
113 .It Pa /var/spool/*/cf*
114 Control files specifying jobs.
115 .It Pa /var/spool/*/lock
116 The lock file to obtain the currently active job.
117 .El
118 .Sh DIAGNOSTICS
119 Unable to open various files.  The lock file being malformed.  Garbage
120 files when there is no daemon active, but files in the spooling directory.
121 .Sh SEE ALSO
122 .Xr lpr 1 ,
123 .Xr lprm 1 ,
124 .Xr lpc 8 ,
125 .Xr lpd 8
126 .Sh HISTORY
127 A
128 .Nm
129 utility appeared in
130 .Bx 3 .
131 .Sh BUGS
132 Due to the dynamic nature of the information in the spooling directory
133 .Nm
134 may report unreliably.
135 Output formatting is sensitive to the line length of the terminal;
136 this can results in widely spaced columns.