Posted On 2007-05-01 by FortyPoundHead
Keywords: Command Reference
Tags: Linux Commandline Linux
Views: 1436

line printer control program

lpc [command [argument ...]]

Lpc is used by the system administrator to control the operation of the
line printer system. For each line printer configured in /etc/printcap,
lpc may be used to:

· disable or enable a printer,

· disable or enable a printer''s spooling queue,

· rearrange the order of jobs in a spooling queue,

· find the status of printers, and their associated spooling
queues and printer dameons.

Without any arguments, lpc will prompt for commands from the standard in­
put. If arguments are supplied, lpc interprets the first argument as a
command and the remaining arguments as parameters to the command. The
standard input may be redirected causing lpc to read commands from file.
Commands may be abreviated;


? [command ...]
help [command ...]
Print a short description of each command specified in the argu­
ment list, or, if no arguments are given, a list of the recog­
nized 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
cannot be printed (i.e., do not 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 new printer
jobs from being entered into the queue by lpr.

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(1).
This is normally used to take a printer down and let others know
why lpq(1) will indicate the printer is down and print the status

enablee { all | printer }
Enable spooling on the local queue for the listed printers. This
will allow lpr(1) to put new jobs in the spool queue.

quit Exit from lpc.

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. Lpq will report that there is no daemon pre­
sent 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).

start { all | printer }
Enable printing and start a spooling daemon for the listed print­

status { all | printer }
Display the status of daemons and queues on the local machine.

stop { all | printer }
Stop a spooling daemon after the current job completes and dis­
able printing.

topq printer [ jobnum ... ] [ user ... ]
Place the jobs in the order listed at the top of the printer

up { all | printer }
Enable everything and start a new printer daemon. Undoes the ef­
fects of down.

/etc/printcap printer description file
/var/spool/* spool directories
/var/spool/*/lock lock file for queue control

ERROR Messages

?Ambiguous command
abbreviation matches more than one command

?Invalid command
no match was found

?Privileged command
command can be executed by root only

About the Author

FortyPoundHead has posted a total of 1974 articles.


Comments On This Post

No comments on this post yet!

Do you have a thought relating to this post? You can post your comment here. If you have an unrelated question, you can use the Q&A section to ask it.

Or you can drop a note to the administrators if you're not sure where you should post.

Your IP address is:

Before you can post, you need to prove you are human. If you log in, this test goes away.

Recent Forum Posts

SSL Now Active
dwirch posted on June 16, 2017 at about 8:40 in Site News

SSL Now Active
dwirch posted on June 13, 2017 at about 7:59 in Site News

Coding Archive?
dwirch posted on June 3, 2017 at about 12:54 in Site News

Job Spammer: Bharti Jigyasi
dwirch posted on June 2, 2017 at about 16:57 in Spammers

Coding Archive?
dwirch posted on May 25, 2017 at about 12:38 in Site News

BWASL returns
dwirch posted on May 13, 2017 at about 15:24 in Site News