1997-10-05 19:11:58 +04:00
|
|
|
.\" $NetBSD: lpc.8,v 1.8 1997/10/05 15:12:09 mrg Exp $
|
|
|
|
.\"
|
1994-05-18 05:25:37 +04:00
|
|
|
.\" Copyright (c) 1983, 1991, 1993
|
|
|
|
.\" The Regents of the University of California. All rights reserved.
|
1993-03-21 12:45:37 +03:00
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by the University of
|
|
|
|
.\" California, Berkeley and its contributors.
|
|
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
|
|
.\" may be used to endorse or promote products derived from this software
|
|
|
|
.\" without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
1997-10-05 15:52:17 +04:00
|
|
|
.\" @(#)lpc.8 8.5 (Berkeley) 4/28/95
|
1993-03-21 12:45:37 +03:00
|
|
|
.\"
|
1997-10-05 15:52:17 +04:00
|
|
|
.Dd April 28, 1995
|
1993-03-21 12:45:37 +03:00
|
|
|
.Dt LPC 8
|
|
|
|
.Os BSD 4.2
|
|
|
|
.Sh NAME
|
|
|
|
.Nm lpc
|
|
|
|
.Nd line printer control program
|
|
|
|
.Sh SYNOPSIS
|
1997-10-05 19:11:58 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
.Oo
|
|
|
|
.Ar command
|
|
|
|
.Op Ar argument ...
|
|
|
|
.Oc
|
|
|
|
.Sh DESCRIPTION
|
1997-10-05 19:11:58 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
is used by the system administrator to control the
|
|
|
|
operation of the line printer system.
|
|
|
|
For each line printer configured in
|
|
|
|
.Pa /etc/printcap ,
|
1997-10-05 19:11:58 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
may be used to:
|
|
|
|
.Bl -bullet -offset indent
|
|
|
|
.It
|
|
|
|
disable or enable a printer,
|
|
|
|
.It
|
|
|
|
disable or enable a printer's spooling queue,
|
|
|
|
.It
|
|
|
|
rearrange the order of jobs in a spooling queue,
|
|
|
|
.It
|
|
|
|
find the status of printers, and their associated
|
1994-01-14 19:22:25 +03:00
|
|
|
spooling queues and printer daemons.
|
1993-03-21 12:45:37 +03:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Without any arguments,
|
1997-10-05 19:11:58 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
will prompt for commands from the standard input.
|
|
|
|
If arguments are supplied,
|
1997-10-05 19:11:58 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
interprets the first argument as a command and the remaining
|
|
|
|
arguments as parameters to the command. The standard input
|
|
|
|
may be redirected causing
|
1997-10-05 19:11:58 +04:00
|
|
|
.Nm
|
1993-03-21 12:45:37 +03:00
|
|
|
to read commands from file.
|
1994-01-14 19:22:25 +03:00
|
|
|
Commands may be abbreviated;
|
1993-03-21 12:45:37 +03:00
|
|
|
the following is the list of recognized commands.
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width Ds -compact
|
|
|
|
.It Ic \&? No [ command ... ]
|
|
|
|
.It Ic help No [ command ... ]
|
|
|
|
Print a short description of each command specified in the argument list,
|
1994-05-18 05:25:37 +04:00
|
|
|
or, if no argument is given, a list of the recognized commands.
|
1993-03-21 12:45:37 +03:00
|
|
|
.Pp
|
|
|
|
.It Ic abort No {\ all\ |\ printer\ }
|
|
|
|
Terminate an active spooling daemon on the local host immediately and
|
|
|
|
then disable printing (preventing new daemons from being started by
|
1997-10-05 19:11:58 +04:00
|
|
|
.Xr lpr 1 )
|
1993-03-21 12:45:37 +03:00
|
|
|
for the specified printers.
|
|
|
|
.Pp
|
|
|
|
.It Ic clean No {\ all\ |\ printer\ }
|
|
|
|
Remove any temporary files, data files, and control files that cannot
|
|
|
|
be printed (i.e., do not form a complete printer job)
|
|
|
|
from the specified printer queue(s) on the local machine.
|
|
|
|
.Pp
|
|
|
|
.It Ic disable No {\ all\ |\ printer\ }
|
|
|
|
Turn the specified printer queues off. This prevents new
|
|
|
|
printer jobs from being entered into the queue by
|
1997-10-05 19:11:58 +04:00
|
|
|
.Xr lpr 1 .
|
1993-03-21 12:45:37 +03:00
|
|
|
.Pp
|
|
|
|
.It Ic down No {\ all\ |\ printer\ } message ...
|
|
|
|
Turn the specified printer queue off, disable printing and put
|
|
|
|
.Em message
|
|
|
|
in the printer status file. The message doesn't need to be quoted, the
|
|
|
|
remaining arguments are treated like
|
|
|
|
.Xr echo 1 .
|
|
|
|
This is normally used to take a printer down and let others know why
|
|
|
|
.Xr lpq 1
|
|
|
|
will indicate the printer is down and print the status message).
|
|
|
|
.Pp
|
|
|
|
.It Ic enable No {\ all\ |\ printer\ }
|
|
|
|
Enable spooling on the local queue for the listed printers.
|
|
|
|
This will allow
|
|
|
|
.Xr lpr 1
|
|
|
|
to put new jobs in the spool queue.
|
|
|
|
.Pp
|
|
|
|
.It Ic exit
|
|
|
|
.It Ic quit
|
|
|
|
Exit from lpc.
|
1997-10-05 15:52:17 +04:00
|
|
|
.ne 1i
|
1993-03-21 12:45:37 +03:00
|
|
|
.Pp
|
|
|
|
.It Ic restart No {\ all\ |\ printer\ }
|
|
|
|
Attempt to start a new printer daemon.
|
|
|
|
This is useful when some abnormal condition causes the daemon to
|
1994-05-18 05:25:37 +04:00
|
|
|
die unexpectedly, leaving jobs in the queue.
|
1997-10-05 19:11:58 +04:00
|
|
|
.Xr Lpq 1
|
1993-03-21 12:45:37 +03:00
|
|
|
will report that there is no daemon present when this condition occurs.
|
|
|
|
If the user is the super-user,
|
|
|
|
try to abort the current daemon first (i.e., kill and restart a stuck daemon).
|
|
|
|
.Pp
|
|
|
|
.It Ic start No {\ all\ |\ printer\ }
|
|
|
|
Enable printing and start a spooling daemon for the listed printers.
|
|
|
|
.Pp
|
|
|
|
.It Ic status No {\ all\ |\ printer\ }
|
|
|
|
Display the status of daemons and queues on the local machine.
|
|
|
|
.Pp
|
|
|
|
.It Ic stop No {\ all\ |\ printer\ }
|
|
|
|
Stop a spooling daemon after the current job completes and disable
|
|
|
|
printing.
|
|
|
|
.Pp
|
|
|
|
.It Ic topq No printer\ [\ jobnum\ ...\ ]\ [\ user\ ...\ ]
|
|
|
|
Place the jobs in the order listed at the top of the printer queue.
|
|
|
|
.Pp
|
|
|
|
.It Ic up No {\ all\ |\ printer\ }
|
|
|
|
Enable everything and start a new printer daemon. Undoes the effects of
|
|
|
|
.Ic down .
|
|
|
|
.Sh FILES
|
1997-07-09 06:04:26 +04:00
|
|
|
.Bl -tag -width /var/spool/output/*/lock -compact
|
1993-03-21 12:45:37 +03:00
|
|
|
.It Pa /etc/printcap
|
|
|
|
printer description file
|
1997-07-09 06:04:26 +04:00
|
|
|
.It Pa /var/spool/output/*
|
1993-03-21 12:45:37 +03:00
|
|
|
spool directories
|
1997-07-09 06:04:26 +04:00
|
|
|
.It Pa /var/spool/output/*/lock
|
1993-03-21 12:45:37 +03:00
|
|
|
lock file for queue control
|
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr lpd 8 ,
|
|
|
|
.Xr lpr 1 ,
|
|
|
|
.Xr lpq 1 ,
|
|
|
|
.Xr lprm 1 ,
|
|
|
|
.Xr printcap 5
|
|
|
|
.Sh DIAGNOSTICS
|
|
|
|
.Bl -tag -width Ds
|
|
|
|
.It Sy "?Ambiguous command"
|
1994-01-14 19:22:25 +03:00
|
|
|
abbreviation matches more than one command
|
1993-03-21 12:45:37 +03:00
|
|
|
.It Sy "?Invalid command"
|
|
|
|
no match was found
|
|
|
|
.It Sy "?Privileged command"
|
1997-10-05 15:52:17 +04:00
|
|
|
you must be a member of group "operator" or root to execute this command
|
1993-03-21 12:45:37 +03:00
|
|
|
.El
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command appeared in
|
|
|
|
.Bx 4.2 .
|