BSD 4_3_Reno release
[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.\"
1c15e888
C
4.\" Redistribution and use in source and binary forms are permitted provided
5.\" that: (1) source distributions retain this entire copyright notice and
6.\" comment, and (2) distributions including binaries display the following
7.\" acknowledgement: ``This product includes software developed by the
8.\" University of California, Berkeley and its contributors'' in the
9.\" documentation or other materials provided with the distribution and in
10.\" all advertising materials mentioning features or use of this software.
11.\" Neither the name of the University nor the names of its contributors may
12.\" be used to endorse or promote products derived from this software without
13.\" specific prior written permission.
14.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
15.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
16.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
929f44b0 17.\"
1c15e888 18.\" @(#)lpq.1 6.8 (Berkeley) 7/24/90
e23ccc70 19.\"
1c15e888 20.Dd July 24, 1990
6a55f534
CL
21.Dt LPQ 1
22.Os BSD 4.2
23.Sh NAME
24.Nm lpq
25.Nd spool queue examination program
26.Sh SYNOPSIS
27.Nm lpq
28.Op Fl l
29.Oo
30.Op Fl P Ar printer
31.Oo
32.Op job # ...
33.Op user ...
34.Sh DESCRIPTION
5325ced3 35.Nm Lpq
e23ccc70 36examines the spooling area used by
6a55f534 37.Xr lpd 8
e12c31f1 38for printing files on the line printer, and reports the status of the
6a55f534 39specified jobs or all jobs associated with a user.
5325ced3 40.Nm Lpq
6a55f534
CL
41invoked
42without any arguments reports on any jobs currently in the queue.
43.Pp
44Options:
45.Pp
5325ced3 46.Tw Ds
6a55f534
CL
47.Tp Fl P
48Specify a particular printer, otherwise the default
49line printer is used (or the value of the
50.Ev PRINTER
51variable in the
e12c31f1
KB
52environment). All other arguments supplied are interpreted as user
53names or job numbers to filter out only those jobs of interest.
6a55f534
CL
54.Tp Fl l
55Information about each of the files comprising the job entry
56is printed.
57Normally, only as much information as will fit on one line is displayed.
58.Tp
59.Pp
60For each job submitted (i.e. invocation of
61.Xr lpr 1 )
62.Nm lpq
e23ccc70
KM
63reports the user's name, current rank in the queue, the
64names of files comprising the job, the job identifier (a number which
65may be supplied to
6a55f534 66.Xr lprm 1
e23ccc70 67for removing a specific job), and the total size in bytes.
e23ccc70
KM
68Job ordering is dependent on
69the algorithm used to scan the spooling directory and is supposed
70to be FIFO (First in First Out).
71File names comprising a job may be unavailable
72(when
6a55f534 73.Xr lpr 1
e23ccc70
KM
74is used as a sink in a pipeline) in which case the file
75is indicated as ``(standard input)".
6a55f534 76.Pp
e23ccc70 77If
6a55f534 78.Nm lpq
e23ccc70
KM
79warns that there is no daemon present (i.e. due to some malfunction),
80the
6a55f534 81.Xr lpc 8
e23ccc70 82command can be used to restart the printer daemon.
6a55f534
CL
83.Sh ENVIRONMENT
84If the following environment variable exists, it is used by
85.Nm lpq :
86.Tw Fl
87.Tp Ev PRINTER
88Specifies an alternate default printer.
89.Tp
90.Sh FILES
91.Dw /usr/share/misc/termcap
92.Di L
93.Dp Pa /usr/share/misc/termcap
94for manipulating the screen for repeated display
95.Dp Pa /etc/printcap
96to determine printer characteristics
97.Dp Pa /var/spool/*
98the spooling directory, as determined from printcap
99.Dp Pa /var/spool/*/cf*
100control files specifying jobs
101.Dp Pa /var/spool/*/lock
102the lock file to obtain the currently active job
103.Dp
104.Sh SEE ALSO
105.Xr lpr 1 ,
106.Xr lprm 1 ,
107.Xr lpc 8 ,
108.Xr lpd 8
109.Sh HISTORY
5325ced3 110.Nm Lpq
6a55f534
CL
111appeared in 3 BSD.
112.Sh BUGS
e23ccc70
KM
113Due to the dynamic nature of the information in the spooling directory
114lpq may report unreliably.
115Output formatting is sensitive to the line length of the terminal;
116this can results in widely spaced columns.
6a55f534 117.Sh DIAGNOSTICS
e23ccc70
KM
118Unable to open various files. The lock file being malformed. Garbage
119files when there is no daemon active, but files in the spooling directory.