xref: /csrg-svn/usr.sbin/lpr/lpc/lpc.8 (revision 61843)
1*61843Sbostic.\" Copyright (c) 1983, 1991, 1993
2*61843Sbostic.\"	The Regents of the University of California.  All rights reserved.
318981Smckusick.\"
443830Strent.\" %sccs.include.redist.man%
518981Smckusick.\"
6*61843Sbostic.\"     @(#)lpc.8	8.1 (Berkeley) 06/06/93
735749Sbostic.\"
847469Scael.Dd
947469Scael.Dt LPC 8
1047469Scael.Os BSD 4.2
1147469Scael.Sh NAME
1247469Scael.Nm lpc
1347469Scael.Nd line printer control program
1447469Scael.Sh SYNOPSIS
1547469Scael.Nm lpc
1647469Scael.Oo
1747469Scael.Ar command
1847469Scael.Op Ar argument ...
1947469Scael.Oc
2047469Scael.Sh DESCRIPTION
2147469Scael.Nm Lpc
2218981Smckusickis used by the system administrator to control the
2318981Smckusickoperation of the line printer system.
2447469ScaelFor each line printer configured in
2547469Scael.Pa /etc/printcap ,
2647469Scael.Nm lpc
2718981Smckusickmay be used to:
2847469Scael.Bl -bullet -offset indent
2947469Scael.It
3018981Smckusickdisable or enable a printer,
3147469Scael.It
3218981Smckusickdisable or enable a printer's spooling queue,
3347469Scael.It
3418981Smckusickrearrange the order of jobs in a spooling queue,
3547469Scael.It
3618981Smckusickfind the status of printers, and their associated
3718981Smckusickspooling queues and printer dameons.
3847469Scael.El
3947469Scael.Pp
4018981SmckusickWithout any arguments,
4147469Scael.Nm lpc
4218981Smckusickwill prompt for commands from the standard input.
4318981SmckusickIf arguments are supplied,
4447469Scael.Nm lpc
4518981Smckusickinterprets the first argument as a command and the remaining
4618981Smckusickarguments as parameters to the command.  The standard input
4718981Smckusickmay be redirected causing
4847469Scael.Nm lpc
4918981Smckusickto read commands from file.
5018981SmckusickCommands may be abreviated;
5118981Smckusickthe following is the list of recognized commands.
5247469Scael.Pp
5347469Scael.Bl -tag -width Ds -compact
5447469Scael.It Ic \&? No [ command ... ]
5547469Scael.It Ic help No [ command ... ]
5618981SmckusickPrint a short description of each command specified in the argument list,
5718981Smckusickor, if no arguments are given, a list of the recognized commands.
5847469Scael.Pp
5947469Scael.It Ic abort  No {\ all\ |\ printer\ }
6018981SmckusickTerminate an active spooling daemon on the local host immediately and
6118981Smckusickthen disable printing (preventing new daemons from being started by
6247469Scael.Xr lpr )
6318981Smckusickfor the specified printers.
6447469Scael.Pp
6547469Scael.It Ic clean  No {\ all\ |\ printer\ }
6618982SmckusickRemove any temporary files, data files, and control files that cannot
6718982Smckusickbe printed (i.e., do not form a complete printer job)
6818981Smckusickfrom the specified printer queue(s) on the local machine.
6947469Scael.Pp
7047469Scael.It Ic disable  No {\ all\ |\ printer\ }
7118982SmckusickTurn the specified printer queues off.  This prevents new
7218982Smckusickprinter jobs from being entered into the queue by
7347469Scael.Xr lpr .
7447469Scael.Pp
7547469Scael.It Ic down No {\ all\ |\ printer\ } message ...
7618982SmckusickTurn the specified printer queue off, disable printing and put
7747469Scael.Em message
7818982Smckusickin the printer status file. The message doesn't need to be quoted, the
7918982Smckusickremaining arguments are treated like
8047469Scael.Xr echo 1 .
8118982SmckusickThis is normally used to take a printer down and let others know why
8247469Scael.Xr lpq 1
8347469Scaelwill indicate the printer is down and print the status message).
8447469Scael.Pp
8547469Scael.It Ic enable  No {\ all\ |\ printer\ }
8618981SmckusickEnable spooling on the local queue for the listed printers.
8718981SmckusickThis will allow
8847469Scael.Xr lpr 1
8918981Smckusickto put new jobs in the spool queue.
9047469Scael.Pp
9147469Scael.It Ic exit
9247469Scael.It Ic quit
9318981SmckusickExit from lpc.
9447469Scael.Pp
9547469Scael.It Ic restart  No {\ all\ |\ printer\ }
9618981SmckusickAttempt to start a new printer daemon.
9718981SmckusickThis is useful when some abnormal condition causes the daemon to
9818981Smckusickdie unexpectedly leaving jobs in the queue.
9947469Scael.Xr Lpq
10018981Smckusickwill report that there is no daemon present when this condition occurs.
10118982SmckusickIf the user is the super-user,
10218982Smckusicktry to abort the current daemon first (i.e., kill and restart a stuck daemon).
10347469Scael.Pp
10447469Scael.It Ic start  No {\ all\ |\ printer\ }
10518981SmckusickEnable printing and start a spooling daemon for the listed printers.
10647469Scael.Pp
10747469Scael.It Ic status  No {\ all\ |\ printer\ }
10818981SmckusickDisplay the status of daemons and queues on the local machine.
10947469Scael.Pp
11047469Scael.It Ic stop  No {\ all\ |\ printer\ }
11118981SmckusickStop a spooling daemon after the current job completes and disable
11218981Smckusickprinting.
11347469Scael.Pp
11447469Scael.It Ic topq No printer\ [\ jobnum\ ...\ ]\ [\ user\ ...\ ]
11518981SmckusickPlace the jobs in the order listed at the top of the printer queue.
11647469Scael.Pp
11747469Scael.It Ic up  No {\ all\ |\ printer\ }
11818982SmckusickEnable everything and start a new printer daemon. Undoes the effects of
11947469Scael.Ic down .
12047469Scael.Sh FILES
12147469Scael.Bl -tag -width /var/spool/*/lockx -compact
12247469Scael.It Pa /etc/printcap
12347469Scaelprinter description file
12447469Scael.It Pa /var/spool/*
12547469Scaelspool directories
12647469Scael.It Pa /var/spool/*/lock
12747469Scaellock file for queue control
12847469Scael.El
12947469Scael.Sh SEE ALSO
13047469Scael.Xr lpd 8 ,
13147469Scael.Xr lpr 1 ,
13247469Scael.Xr lpq 1 ,
13347469Scael.Xr lprm 1 ,
13447469Scael.Xr printcap 5
13547469Scael.Sh DIAGNOSTICS
13647469Scael.Bl -tag -width Ds
13747469Scael.It Sy "?Ambiguous command"
13847469Scaelabreviation matches more than one command
13947469Scael.It Sy "?Invalid command"
14047469Scaelno match was found
14147469Scael.It Sy "?Privileged command"
14247469Scaelcommand can be executed by root only
14347469Scael.El
14447469Scael.Sh HISTORY
14547469ScaelThe
14647469Scael.Nm
14747469Scaelcommand appeared in
14847469Scael.Bx 4.2 .
149