add .Vx so tmac.andoc will call tmac.mdoc-old
[unix-history] / usr / src / usr.sbin / lpr / lpq / lpq.1
CommitLineData
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 24examines the spooling area used by
6a55f534 25.Xr lpd 8
e12c31f1 26for printing files on the line printer, and reports the status of the
6a55f534 27specified jobs or all jobs associated with a user.
5325ced3 28.Nm Lpq
6a55f534
CL
29invoked
30without any arguments reports on any jobs currently in the queue.
31.Pp
32Options:
33.Pp
5325ced3 34.Tw Ds
6a55f534
CL
35.Tp Fl P
36Specify a particular printer, otherwise the default
37line printer is used (or the value of the
38.Ev PRINTER
39variable in the
e12c31f1
KB
40environment). All other arguments supplied are interpreted as user
41names or job numbers to filter out only those jobs of interest.
6a55f534
CL
42.Tp Fl l
43Information about each of the files comprising the job entry
44is printed.
45Normally, only as much information as will fit on one line is displayed.
46.Tp
47.Pp
48For each job submitted (i.e. invocation of
49.Xr lpr 1 )
50.Nm lpq
e23ccc70
KM
51reports the user's name, current rank in the queue, the
52names of files comprising the job, the job identifier (a number which
53may be supplied to
6a55f534 54.Xr lprm 1
e23ccc70 55for removing a specific job), and the total size in bytes.
e23ccc70
KM
56Job ordering is dependent on
57the algorithm used to scan the spooling directory and is supposed
58to be FIFO (First in First Out).
59File names comprising a job may be unavailable
60(when
6a55f534 61.Xr lpr 1
e23ccc70
KM
62is used as a sink in a pipeline) in which case the file
63is indicated as ``(standard input)".
6a55f534 64.Pp
e23ccc70 65If
6a55f534 66.Nm lpq
e23ccc70
KM
67warns that there is no daemon present (i.e. due to some malfunction),
68the
6a55f534 69.Xr lpc 8
e23ccc70 70command can be used to restart the printer daemon.
6a55f534
CL
71.Sh ENVIRONMENT
72If the following environment variable exists, it is used by
73.Nm lpq :
74.Tw Fl
75.Tp Ev PRINTER
76Specifies 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
82for manipulating the screen for repeated display
83.Dp Pa /etc/printcap
84to determine printer characteristics
85.Dp Pa /var/spool/*
86the spooling directory, as determined from printcap
87.Dp Pa /var/spool/*/cf*
88control files specifying jobs
89.Dp Pa /var/spool/*/lock
90the 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
99appeared in 3 BSD.
100.Sh BUGS
e23ccc70
KM
101Due to the dynamic nature of the information in the spooling directory
102lpq may report unreliably.
103Output formatting is sensitive to the line length of the terminal;
104this can results in widely spaced columns.
6a55f534 105.Sh DIAGNOSTICS
e23ccc70
KM
106Unable to open various files. The lock file being malformed. Garbage
107files when there is no daemon active, but files in the spooling directory.