macro and text revision (-mdoc version 3)
[unix-history] / usr / src / usr.sbin / lpr / lpc / lpc.8
CommitLineData
b42074ab 1.\" Copyright (c) 1983, 1991 The Regents of the University of California.
929f44b0 2.\" All rights reserved.
89b3926c 3.\"
58bd7e0b 4.\" %sccs.include.redist.man%
929f44b0 5.\"
b42074ab 6.\" @(#)lpc.8 6.4 (Berkeley) %G%
89b3926c 7.\"
b42074ab
CL
8.Dd
9.Dt LPC 8
10.Os BSD 4.2
11.Sh NAME
12.Nm lpc
13.Nd line printer control program
14.Sh SYNOPSIS
15.Nm lpc
16.Oo
17.Ar command
18.Op Ar argument ...
19.Oc
20.Sh DESCRIPTION
21.Nm Lpc
89b3926c
KM
22is used by the system administrator to control the
23operation of the line printer system.
b42074ab
CL
24For each line printer configured in
25.Pa /etc/printcap ,
26.Nm lpc
89b3926c 27may be used to:
b42074ab
CL
28.Bl -bullet -offset indent
29.It
89b3926c 30disable or enable a printer,
b42074ab 31.It
89b3926c 32disable or enable a printer's spooling queue,
b42074ab 33.It
89b3926c 34rearrange the order of jobs in a spooling queue,
b42074ab 35.It
89b3926c
KM
36find the status of printers, and their associated
37spooling queues and printer dameons.
b42074ab
CL
38.El
39.Pp
89b3926c 40Without any arguments,
b42074ab 41.Nm lpc
89b3926c
KM
42will prompt for commands from the standard input.
43If arguments are supplied,
b42074ab 44.Nm lpc
89b3926c
KM
45interprets the first argument as a command and the remaining
46arguments as parameters to the command. The standard input
47may be redirected causing
b42074ab 48.Nm lpc
89b3926c
KM
49to read commands from file.
50Commands may be abreviated;
51the following is the list of recognized commands.
b42074ab
CL
52.Pp
53.Bl -tag -width Ds -compact
54.It Ic \&? No [ command ... ]
55.It Ic help No [ command ... ]
89b3926c
KM
56Print a short description of each command specified in the argument list,
57or, if no arguments are given, a list of the recognized commands.
b42074ab
CL
58.Pp
59.It Ic abort No {\ all\ |\ printer\ }
89b3926c
KM
60Terminate an active spooling daemon on the local host immediately and
61then disable printing (preventing new daemons from being started by
b42074ab 62.Xr lpr )
89b3926c 63for the specified printers.
b42074ab
CL
64.Pp
65.It Ic clean No {\ all\ |\ printer\ }
0edd7210
KM
66Remove any temporary files, data files, and control files that cannot
67be printed (i.e., do not form a complete printer job)
89b3926c 68from the specified printer queue(s) on the local machine.
b42074ab
CL
69.Pp
70.It Ic disable No {\ all\ |\ printer\ }
0edd7210
KM
71Turn the specified printer queues off. This prevents new
72printer jobs from being entered into the queue by
b42074ab
CL
73.Xr lpr .
74.Pp
75.It Ic down No {\ all\ |\ printer\ } message ...
0edd7210 76Turn the specified printer queue off, disable printing and put
b42074ab 77.Em message
0edd7210
KM
78in the printer status file. The message doesn't need to be quoted, the
79remaining arguments are treated like
b42074ab 80.Xr echo 1 .
0edd7210 81This is normally used to take a printer down and let others know why
b42074ab
CL
82.Xr lpq 1
83will indicate the printer is down and print the status message).
84.Pp
85.It Ic enable No {\ all\ |\ printer\ }
89b3926c
KM
86Enable spooling on the local queue for the listed printers.
87This will allow
b42074ab 88.Xr lpr 1
89b3926c 89to put new jobs in the spool queue.
b42074ab
CL
90.Pp
91.It Ic exit
92.It Ic quit
89b3926c 93Exit from lpc.
b42074ab
CL
94.Pp
95.It Ic restart No {\ all\ |\ printer\ }
89b3926c
KM
96Attempt to start a new printer daemon.
97This is useful when some abnormal condition causes the daemon to
98die unexpectedly leaving jobs in the queue.
b42074ab 99.Xr Lpq
89b3926c 100will report that there is no daemon present when this condition occurs.
0edd7210
KM
101If the user is the super-user,
102try to abort the current daemon first (i.e., kill and restart a stuck daemon).
b42074ab
CL
103.Pp
104.It Ic start No {\ all\ |\ printer\ }
89b3926c 105Enable printing and start a spooling daemon for the listed printers.
b42074ab
CL
106.Pp
107.It Ic status No {\ all\ |\ printer\ }
89b3926c 108Display the status of daemons and queues on the local machine.
b42074ab
CL
109.Pp
110.It Ic stop No {\ all\ |\ printer\ }
89b3926c
KM
111Stop a spooling daemon after the current job completes and disable
112printing.
b42074ab
CL
113.Pp
114.It Ic topq No printer\ [\ jobnum\ ...\ ]\ [\ user\ ...\ ]
89b3926c 115Place the jobs in the order listed at the top of the printer queue.
b42074ab
CL
116.Pp
117.It Ic up No {\ all\ |\ printer\ }
0edd7210 118Enable everything and start a new printer daemon. Undoes the effects of
b42074ab
CL
119.Ic down .
120.Sh FILES
121.Bl -tag -width /var/spool/*/lockx -compact
122.It Pa /etc/printcap
123printer description file
124.It Pa /var/spool/*
125spool directories
126.It Pa /var/spool/*/lock
127lock file for queue control
128.El
129.Sh SEE ALSO
130.Xr lpd 8 ,
131.Xr lpr 1 ,
132.Xr lpq 1 ,
133.Xr lprm 1 ,
134.Xr printcap 5
135.Sh DIAGNOSTICS
136.Bl -tag -width Ds
137.It Sy "?Ambiguous command"
138abreviation matches more than one command
139.It Sy "?Invalid command"
140no match was found
141.It Sy "?Privileged command"
142command can be executed by root only
143.El
144.Sh HISTORY
145The
146.Nm
147command appeared in
148.Bx 4.2 .