1994-05-26 05:23:31 +00:00
|
|
|
.\" Copyright (c) 1983, 1991, 1993
|
|
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" 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.
|
|
|
|
.\"
|
1996-05-05 22:40:51 +00:00
|
|
|
.\" @(#)lpc.8 8.5 (Berkeley) 4/28/95
|
1999-08-28 01:35:59 +00:00
|
|
|
.\" $FreeBSD$
|
1994-05-26 05:23:31 +00:00
|
|
|
.\"
|
2002-06-15 22:51:58 +00:00
|
|
|
.Dd June 15, 2002
|
1994-05-26 05:23:31 +00:00
|
|
|
.Dt LPC 8
|
2001-07-05 08:22:01 +00:00
|
|
|
.Os
|
1994-05-26 05:23:31 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm lpc
|
|
|
|
.Nd line printer control program
|
|
|
|
.Sh SYNOPSIS
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
2001-02-01 16:44:04 +00:00
|
|
|
.Op Ar command Op Ar argument ...
|
1994-05-26 05:23:31 +00:00
|
|
|
.Sh DESCRIPTION
|
2002-07-14 14:47:15 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is used by the system administrator to control the
|
2001-07-05 08:22:01 +00:00
|
|
|
operation of the line printer system.
|
1994-05-26 05:23:31 +00:00
|
|
|
For each line printer configured in
|
|
|
|
.Pa /etc/printcap ,
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00: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
|
2002-06-15 22:51:58 +00:00
|
|
|
spooling queues and printer daemons,
|
|
|
|
.It
|
|
|
|
change the status message for printer queues (the status message
|
|
|
|
may be seen by users as part of the output of the
|
|
|
|
.Xr lpq 1 utility).
|
1994-05-26 05:23:31 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Without any arguments,
|
1997-09-24 06:48:24 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
will prompt for commands from the standard input.
|
|
|
|
If arguments are supplied,
|
1997-09-24 06:48:24 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
interprets the first argument as a command and the remaining
|
2001-07-05 08:22:01 +00:00
|
|
|
arguments as parameters to the command.
|
|
|
|
The standard input
|
1994-05-26 05:23:31 +00:00
|
|
|
may be redirected causing
|
1997-09-24 06:48:24 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
to read commands from file.
|
|
|
|
Commands may be abbreviated;
|
|
|
|
the following is the list of recognized commands.
|
|
|
|
.Pp
|
2001-02-01 16:44:04 +00:00
|
|
|
.Bl -tag -width indent -compact
|
|
|
|
.It Ic \&? Op Ar command ...
|
|
|
|
.It Ic help Op Ar command ...
|
1994-05-26 05:23:31 +00:00
|
|
|
Print a short description of each command specified in the argument list,
|
|
|
|
or, if no argument is given, a list of the recognized commands.
|
|
|
|
.Pp
|
2001-07-05 08:22:01 +00:00
|
|
|
.It Ic abort Brq Cm all | Ar printer
|
1994-05-26 05:23:31 +00:00
|
|
|
Terminate an active spooling daemon on the local host immediately and
|
|
|
|
then disable printing (preventing new daemons from being started by
|
1996-04-08 04:18:31 +00:00
|
|
|
.Xr lpr 1 )
|
1994-05-26 05:23:31 +00:00
|
|
|
for the specified printers.
|
|
|
|
.Pp
|
2001-07-05 08:22:01 +00:00
|
|
|
.It Ic clean Brq Cm all | Ar printer
|
1994-05-26 05:23:31 +00:00
|
|
|
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.
|
2001-07-05 08:22:01 +00:00
|
|
|
This command will also look for
|
|
|
|
.Pa core
|
|
|
|
files in spool directory
|
2001-06-25 02:05:03 +00:00
|
|
|
for each printer queue, and list any that are found.
|
2001-07-05 08:22:01 +00:00
|
|
|
It will not remove any
|
|
|
|
.Pa core
|
|
|
|
files.
|
|
|
|
See also the
|
2001-06-25 02:05:03 +00:00
|
|
|
.Ic tclean
|
|
|
|
command.
|
1994-05-26 05:23:31 +00:00
|
|
|
.Pp
|
2001-07-05 08:22:01 +00:00
|
|
|
.It Ic disable Brq Cm all | Ar printer
|
|
|
|
Turn the specified printer queues off.
|
|
|
|
This prevents new
|
1994-05-26 05:23:31 +00:00
|
|
|
printer jobs from being entered into the queue by
|
1996-04-08 04:18:31 +00:00
|
|
|
.Xr lpr 1 .
|
1994-05-26 05:23:31 +00:00
|
|
|
.Pp
|
2002-06-16 01:43:29 +00:00
|
|
|
.It Ic down Bro Cm all | Ar printer ... Brc Cm -msg Ar message ...
|
2001-07-05 08:22:01 +00:00
|
|
|
.It Ic down Bro Cm all | Ar printer Brc Ar message ...
|
1994-05-26 05:23:31 +00:00
|
|
|
Turn the specified printer queue off, disable printing and put
|
2001-02-01 16:44:04 +00:00
|
|
|
.Ar message
|
2000-03-01 14:09:25 +00:00
|
|
|
in the printer status file.
|
2002-06-16 01:43:29 +00:00
|
|
|
When specifying more than one printer queue, the
|
|
|
|
.Ic -msg
|
|
|
|
argument is required to separate the list of printers from the text
|
|
|
|
that will be the new status message.
|
2000-03-01 14:09:25 +00:00
|
|
|
The message doesn't need to be quoted, the
|
1994-05-26 05:23:31 +00:00
|
|
|
remaining arguments are treated like
|
|
|
|
.Xr echo 1 .
|
2002-06-15 23:47:40 +00:00
|
|
|
This is normally used to take a printer down, and let other users
|
|
|
|
find out why it is down (the
|
1994-05-26 05:23:31 +00:00
|
|
|
.Xr lpq 1
|
2002-06-15 23:47:40 +00:00
|
|
|
utility will indicate that the printer is down and will print the
|
|
|
|
status message).
|
1994-05-26 05:23:31 +00:00
|
|
|
.Pp
|
2001-07-05 08:22:01 +00:00
|
|
|
.It Ic enable Brq Cm all | Ar printer
|
|
|
|
Enable spooling on the local queue for the listed printers.
|
1994-05-26 05:23:31 +00:00
|
|
|
This will allow
|
|
|
|
.Xr lpr 1
|
|
|
|
to put new jobs in the spool queue.
|
|
|
|
.Pp
|
|
|
|
.It Ic exit
|
|
|
|
.It Ic quit
|
2001-02-01 16:44:04 +00:00
|
|
|
Exit from
|
|
|
|
.Nm .
|
1994-05-26 05:23:31 +00:00
|
|
|
.Pp
|
2001-07-05 08:22:01 +00:00
|
|
|
.It Ic restart Brq Cm all | Ar printer
|
|
|
|
Attempt to start a new printer daemon.
|
1994-05-26 05:23:31 +00:00
|
|
|
This is useful when some abnormal condition causes the daemon to
|
|
|
|
die unexpectedly, leaving jobs in the queue.
|
2001-02-01 16:44:04 +00:00
|
|
|
.Xr lpq 1
|
2001-07-05 08:22:01 +00:00
|
|
|
will report that there is no daemon present when this condition occurs.
|
1994-05-26 05:23:31 +00:00
|
|
|
If the user is the super-user,
|
|
|
|
try to abort the current daemon first (i.e., kill and restart a stuck daemon).
|
|
|
|
.Pp
|
2002-06-15 22:51:58 +00:00
|
|
|
.It Ic setstatus Bro Cm all | Ar printer Brc Cm -msg Ar message ...
|
|
|
|
Set the status message for the specified printers.
|
|
|
|
The
|
|
|
|
.Ic -msg
|
|
|
|
argument is required to separate the list of printers from the text
|
|
|
|
that will be the new status message.
|
|
|
|
This is normally used to change the status message when the printer
|
|
|
|
queue is no longer active after printing has been disabled, and you
|
|
|
|
want to change what users will see in the output of the
|
|
|
|
.Xr lpq 1 utility.
|
|
|
|
.Pp
|
2001-07-05 08:22:01 +00:00
|
|
|
.It Ic start Brq Cm all | Ar printer
|
1994-05-26 05:23:31 +00:00
|
|
|
Enable printing and start a spooling daemon for the listed printers.
|
|
|
|
.Pp
|
2001-07-05 08:22:01 +00:00
|
|
|
.It Ic status Brq Cm all | Ar printer
|
1994-05-26 05:23:31 +00:00
|
|
|
Display the status of daemons and queues on the local machine.
|
|
|
|
.Pp
|
2001-07-05 08:22:01 +00:00
|
|
|
.It Ic stop Brq Cm all | Ar printer
|
1994-05-26 05:23:31 +00:00
|
|
|
Stop a spooling daemon after the current job completes and disable
|
|
|
|
printing.
|
|
|
|
.Pp
|
2001-07-05 08:22:01 +00:00
|
|
|
.It Ic tclean Brq Cm all | Ar printer
|
2001-06-25 02:05:03 +00:00
|
|
|
This will do a test-run of the
|
|
|
|
.Ic clean
|
|
|
|
command.
|
|
|
|
All the same checking is done, but the command will only print out
|
|
|
|
messages saying what a similar
|
|
|
|
.Ic clean
|
|
|
|
command would do if the user typed it in.
|
|
|
|
It will not remove any files.
|
|
|
|
Note that the
|
|
|
|
.Ic clean
|
|
|
|
command is a privileged command, while the
|
|
|
|
.Ic tclean
|
|
|
|
command is not restricted.
|
|
|
|
.Pp
|
2001-02-01 16:44:04 +00:00
|
|
|
.It Ic topq Ar printer Xo
|
|
|
|
.Op Ar jobnum ...
|
|
|
|
.Op Ar user ...
|
|
|
|
.Xc
|
1994-05-26 05:23:31 +00:00
|
|
|
Place the jobs in the order listed at the top of the printer queue.
|
|
|
|
.Pp
|
2001-07-05 08:22:01 +00:00
|
|
|
.It Ic up Brq Cm all | Ar printer
|
2000-03-01 14:09:25 +00:00
|
|
|
Enable everything and start a new printer daemon.
|
|
|
|
Undoes the effects of
|
1994-05-26 05:23:31 +00:00
|
|
|
.Ic down .
|
2000-12-27 15:30:30 +00:00
|
|
|
.El
|
1994-05-26 05:23:31 +00:00
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width /var/spool/*/lockx -compact
|
|
|
|
.It Pa /etc/printcap
|
|
|
|
printer description file
|
|
|
|
.It Pa /var/spool/*
|
|
|
|
spool directories
|
|
|
|
.It Pa /var/spool/*/lock
|
|
|
|
lock file for queue control
|
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr lpq 1 ,
|
1997-01-20 00:03:00 +00:00
|
|
|
.Xr lpr 1 ,
|
1994-05-26 05:23:31 +00:00
|
|
|
.Xr lprm 1 ,
|
1997-01-20 00:03:00 +00:00
|
|
|
.Xr printcap 5 ,
|
2002-04-22 01:04:02 +00:00
|
|
|
.Xr chkprintcap 8 ,
|
1997-01-20 00:03:00 +00:00
|
|
|
.Xr lpd 8
|
1994-05-26 05:23:31 +00:00
|
|
|
.Sh DIAGNOSTICS
|
2001-04-13 19:59:47 +00:00
|
|
|
.Bl -diag
|
|
|
|
.It "?Ambiguous command"
|
1994-05-26 05:23:31 +00:00
|
|
|
abbreviation matches more than one command
|
2001-04-13 19:59:47 +00:00
|
|
|
.It "?Invalid command"
|
1994-05-26 05:23:31 +00:00
|
|
|
no match was found
|
2001-04-13 19:59:47 +00:00
|
|
|
.It "?Privileged command"
|
1996-05-05 22:40:51 +00:00
|
|
|
you must be a member of group "operator" or root to execute this command
|
1994-05-26 05:23:31 +00:00
|
|
|
.El
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility appeared in
|
1994-05-26 05:23:31 +00:00
|
|
|
.Bx 4.2 .
|