Control the line printers


lprc [command [argument ...]]

Runs on:





The system administrator (i.e. root) uses the lprc utility to control the operation of the line printers that are configured in /etc/printcap. You can use lprc to:

Without any arguments, lprc prompts for commands from the standard input. If arguments are supplied, lprc interprets the first argument as a command and the remaining arguments as parameters to the command. You can redirect standard input so that lprc reads commands from file. You can abbreviate the commands.

Here's a list of recognized commands:

? [command ...]
help [command ...]
Print a short description of each command specified in the argument list. If you don't specify a command, lprc displays a list of the recognized commands.
abort { all | printer }
Terminate an active spooling daemon on the local host immediately and then disable printing (preventing new daemons from being started by lpr) for the specified printers.
clean { all | printer }
Remove any temporary files, data files, and control files that can't be printed (i.e. that don't form a complete printer job) from the specified printer queue(s) on the local machine.
disable { all | printer }
Turn the specified printer queues off. This prevents lpr from adding new to the queue.
down { all | printer } message ...
Turn the specified printer queue off, disable printing, and put message in the printer status file. The message doesn't need to be quoted; the remaining arguments are treated like echo.

You normally use the down to take a printer down, let others know why lprq indicates the printer is down, and print the status message.

enable { all | printer }
Enable spooling on the local queue for the listed printers. This lets lpr put new jobs in the spool queue.
Exit from lprc.
restart { all | printer }
Attempt to start a new printer daemon. This is useful when some abnormal condition causes the daemon to die unexpectedly, leaving jobs in the queue. The lprq utility reports that no daemon is present when this condition occurs. If the user is the superuser, try to abort the current daemon first (i.e. kill and restart a "stuck" daemon).
start { all | printer }
Enable printing and start a spooling daemon for the listed printers.
status [all | printer]
Display the status of daemons and queues. If you don't specify a printer, lprc displays the status of all printers defined in the /etc/printcap file.
stop { all | printer }
Stop a spooling daemon after the current job completes and disable printing.
topq printer [jobnum ... ] [user ... ]
Place the jobs in the order listed at the top of the printer queue.
up { all | printer }
Enable everything and start a new printer daemon. This command undoes the effects of down.


Printer description file.


?Ambiguous command
Abbreviation matches more than one command.
?Invalid command
No match was found.
?Privileged command
The command can be executed only by root.

See also:

lpd, lpr, lprq, lprrm, /etc/printcap

Printing in the Neutrino User's Guide