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