BSD 4_4 development
[unix-history] / .ref-6294d633e80db8e89697db796e6f6025d5af0cae / 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.\"
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 22examines the spooling area used by
6a55f534 23.Xr lpd 8
e12c31f1 24for printing files on the line printer, and reports the status of the
6a55f534 25specified jobs or all jobs associated with a user.
5325ced3 26.Nm Lpq
6a55f534
CL
27invoked
28without any arguments reports on any jobs currently in the queue.
29.Pp
30Options:
31.Pp
763b1ce2
CL
32.Bl -tag -width indent
33.It Fl P
6a55f534
CL
34Specify a particular printer, otherwise the default
35line printer is used (or the value of the
36.Ev PRINTER
37variable in the
e12c31f1
KB
38environment). All other arguments supplied are interpreted as user
39names or job numbers to filter out only those jobs of interest.
763b1ce2 40.It Fl l
6a55f534
CL
41Information about each of the files comprising the job entry
42is printed.
43Normally, only as much information as will fit on one line is displayed.
763b1ce2 44.El
6a55f534
CL
45.Pp
46For each job submitted (i.e. invocation of
47.Xr lpr 1 )
48.Nm lpq
e23ccc70
KM
49reports the user's name, current rank in the queue, the
50names of files comprising the job, the job identifier (a number which
51may be supplied to
6a55f534 52.Xr lprm 1
e23ccc70 53for removing a specific job), and the total size in bytes.
e23ccc70
KM
54Job ordering is dependent on
55the algorithm used to scan the spooling directory and is supposed
763b1ce2
CL
56to be
57.Tn FIFO
58(First in First Out).
e23ccc70
KM
59File names comprising a job may be unavailable
60(when
6a55f534 61.Xr lpr 1
e23ccc70 62is used as a sink in a pipeline) in which case the file
763b1ce2 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 :
763b1ce2
CL
74.Bl -tag -width PRINTER
75.It Ev PRINTER
6a55f534 76Specifies 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
81To determine printer characteristics.
82.It Pa /var/spool/*
83The spooling directory, as determined from printcap.
84.It Pa /var/spool/*/cf*
85Control files specifying jobs.
86.It Pa /var/spool/*/lock
87The lock file to obtain the currently active job.
88.It Pa /usr/share/misc/termcap
89For 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
98appeared in
99.Bx 3 .
6a55f534 100.Sh BUGS
e23ccc70 101Due to the dynamic nature of the information in the spooling directory
763b1ce2
CL
102.Nm lpq
103may report unreliably.
e23ccc70
KM
104Output formatting is sensitive to the line length of the terminal;
105this can results in widely spaced columns.
6a55f534 106.Sh DIAGNOSTICS
e23ccc70
KM
107Unable to open various files. The lock file being malformed. Garbage
108files when there is no daemon active, but files in the spooling directory.