~ubuntu-branches/ubuntu/hoary/lpr/hoary

« back to all changes in this revision

Viewing changes to lpc/lpc.8

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-03-15 14:54:38 UTC
  • Revision ID: james.westby@ubuntu.com-20030315145438-3n1sxzrmv1g34n4t
Tags: upstream-2000.05.07
ImportĀ upstreamĀ versionĀ 2000.05.07

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\"     $OpenBSD: lpc.8,v 1.9 2000/04/15 11:45:59 aaron Exp $
 
2
.\"
 
3
.\" Copyright (c) 1983, 1991, 1993
 
4
.\"     The Regents of the University of California.  All rights reserved.
 
5
.\"
 
6
.\" Redistribution and use in source and binary forms, with or without
 
7
.\" modification, are permitted provided that the following conditions
 
8
.\" are met:
 
9
.\" 1. Redistributions of source code must retain the above copyright
 
10
.\"    notice, this list of conditions and the following disclaimer.
 
11
.\" 2. Redistributions in binary form must reproduce the above copyright
 
12
.\"    notice, this list of conditions and the following disclaimer in the
 
13
.\"    documentation and/or other materials provided with the distribution.
 
14
.\" 3. All advertising materials mentioning features or use of this software
 
15
.\"    must display the following acknowledgement:
 
16
.\"     This product includes software developed by the University of
 
17
.\"     California, Berkeley and its contributors.
 
18
.\" 4. Neither the name of the University nor the names of its contributors
 
19
.\"    may be used to endorse or promote products derived from this software
 
20
.\"    without specific prior written permission.
 
21
.\"
 
22
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 
23
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 
24
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 
25
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 
26
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 
27
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 
28
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 
29
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 
30
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 
31
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 
32
.\" SUCH DAMAGE.
 
33
.\"
 
34
.\"     @(#)lpc.8       8.5 (Berkeley) 4/28/95
 
35
.\"
 
36
.Dd April 28, 1995
 
37
.Dt LPC 8
 
38
.Os
 
39
.Sh NAME
 
40
.Nm lpc
 
41
.Nd line printer control program
 
42
.Sh SYNOPSIS
 
43
.Nm lpc
 
44
.Oo
 
45
.Ar command
 
46
.Op Ar argument ...
 
47
.Oc
 
48
.Sh DESCRIPTION
 
49
.Nm
 
50
is used by the system administrator to control the
 
51
operation of the line printer system.
 
52
For each line printer configured in
 
53
.Pa /etc/printcap ,
 
54
.Nm
 
55
may be used to:
 
56
.Bl -bullet -offset indent
 
57
.It
 
58
disable or enable a printer,
 
59
.It
 
60
disable or enable a printer's spooling queue,
 
61
.It
 
62
rearrange the order of jobs in a spooling queue,
 
63
.It
 
64
find the status of printers, and their associated
 
65
spooling queues and printer daemons.
 
66
.El
 
67
.Pp
 
68
Without any arguments,
 
69
.Nm
 
70
will prompt for commands from the standard input.
 
71
If arguments are supplied,
 
72
.Nm
 
73
interprets the first argument as a command and the remaining
 
74
arguments as parameters to the command.
 
75
The standard input may be redirected causing
 
76
.Nm
 
77
to read commands from file.
 
78
Commands may be abbreviated;
 
79
the following is the list of recognized commands.
 
80
.Pp
 
81
.Bl -tag -width Ds -compact
 
82
.It Ic \&? No [ Ar command Ar ... ]
 
83
.It Ic help No [ Ar command Ar ... ]
 
84
Print a short description of each command specified in the argument list,
 
85
or, if no argument is given, a list of the recognized commands.
 
86
.Pp
 
87
.It Ic abort  No {\ all\ |\ printer\ }
 
88
Terminate an active spooling daemon on the local host immediately and
 
89
then disable printing (preventing new daemons from being started by
 
90
.Xr lpr )
 
91
for the specified printers.
 
92
.Pp
 
93
.It Ic clean  No {\ all\ |\ printer\ }
 
94
Remove any temporary files, data files, and control files that cannot
 
95
be printed (i.e., do not form a complete printer job)
 
96
from the specified printer queue(s) on the local machine.
 
97
.Pp
 
98
.It Ic disable  No {\ all\ |\ printer\ }
 
99
Turn the specified printer queues off.
 
100
This prevents new printer jobs from being entered into the queue by
 
101
.Xr lpr .
 
102
.Pp
 
103
.It Xo Ic down No {\ all\ |\ printer\ } Ar message
 
104
.Op Ar ...
 
105
.Xc
 
106
Turn the specified printer queue off, disable printing and put
 
107
.Em message
 
108
in the printer status file.
 
109
The message doesn't need to be quoted, the
 
110
remaining arguments are treated like
 
111
.Xr echo 1 .
 
112
This is normally used to take a printer down and let others know why
 
113
.Xr lpq 1
 
114
will indicate the printer is down and print the status message.
 
115
.Pp
 
116
.It Ic enable  No {\ all\ |\ printer\ }
 
117
Enable spooling on the local queue for the listed printers.
 
118
This will allow
 
119
.Xr lpr 1
 
120
to put new jobs in the spool queue.
 
121
.Pp
 
122
.It Ic exit
 
123
.It Ic quit
 
124
Exit from
 
125
.Nm lpc .
 
126
.Pp
 
127
.It Ic restart  No {\ all\ |\ printer\ }
 
128
Attempt to start a new printer daemon.
 
129
This is useful when some abnormal condition causes the daemon to
 
130
die unexpectedly, leaving jobs in the queue.
 
131
.Xr Lpq
 
132
will report that there is no daemon present when this condition occurs.
 
133
If the user is the superuser,
 
134
try to abort the current daemon first (i.e., kill and restart a stuck daemon).
 
135
.Pp
 
136
.It Ic start  No {\ all\ |\ printer\ }
 
137
Enable printing and start a spooling daemon for the listed printers.
 
138
.Pp
 
139
.It Ic status  No {\ all\ |\ printer\ }
 
140
Display the status of daemons and queues on the local machine.
 
141
.Pp
 
142
.It Ic stop  No {\ all\ |\ printer\ }
 
143
Stop a spooling daemon after the current job completes and disable
 
144
printing.
 
145
.Pp
 
146
.It Ic topq No printer\ [\ jobnum\ ...\ ]\ [\ user\ ...\ ]
 
147
Place the jobs in the order listed at the top of the printer queue.
 
148
.Pp
 
149
.It Ic up  No {\ all\ |\ printer\ }
 
150
Enable everything and start a new printer daemon.
 
151
Undoes the effects of
 
152
.Ic down .
 
153
.El
 
154
.Sh FILES
 
155
.Bl -tag -width /var/spool/*/lockx -compact
 
156
.It Pa /etc/printcap
 
157
printer description file
 
158
.It Pa /var/spool/*
 
159
spool directories
 
160
.It Pa /var/spool/*/lock
 
161
lock file for queue control
 
162
.El
 
163
.Sh SEE ALSO
 
164
.Xr lpq 1 ,
 
165
.Xr lpr 1 ,
 
166
.Xr lprm 1 ,
 
167
.Xr printcap 5 ,
 
168
.Xr lpd 8
 
169
.Sh DIAGNOSTICS
 
170
.Bl -tag -width Ds
 
171
.It Sy "?Ambiguous command"
 
172
Abbreviation matches more than one command.
 
173
.It Sy "?Invalid command"
 
174
No match was found.
 
175
.It Sy "?Privileged command"
 
176
You must be a member of group
 
177
.Dq operator
 
178
or user
 
179
.Dq root
 
180
to execute this command.
 
181
.El
 
182
.Sh HISTORY
 
183
The
 
184
.Nm
 
185
command appeared in
 
186
.Bx 4.2 .