Sidebar: Using lpq
 
lpq is a simple command with one purpose: to display
the contents 
of a single printing queue. You can display the queue
contents in 
one of several ways, depending on the arguments used.
Executed with 
no arguments, lpq displays all print jobs for all users
currently 
in the queue for the default printer, which is specified
in the PRINTER 
environment variable. Or you may specify a particular
printer using 
the "-P," argument, as in: 
 
% lpq -Pprintername 
 
If lpq is invoked in this manner, all jobs for 
all users currently in that printer's queue will be
displayed. If 
you want to see only particular jobs, you may add one
or more job 
numbers as arguments. You may also specify one or more
users to see 
only jobs belonging to those users. 
Another handy lpq option is the "+," argument: 
 
% lpq -Pprintername + [ seconds ] 
 
The "+," argument causes lpq to periodically
redisplay the printing queue contents, giving you a
constant update 
until there are no more jobs in the queue. If a number
is specified 
after the "+", the printing queue redisplays
in intervals 
of the specified number of seconds.  
 
   
  |