Information Technology Reference
In-Depth Information
Also the
lpstat
command supports several other commonly used command-
line arguments. These include
-a
to list printers accepting requests,
-u
to list
users that have queued print requests, and
-c
to list printer classes and class
members.
Canceling Print Jobs
The
cancel(1)
command is used to cancel one or more print requests: the request
currently being printed or print requests from a specific user. The following list-
ing shows canceling the print request with the request ID of
laser1-27
:
# cancel laser1-27
laser1-27: cancelled
#
Multiple request IDs (separated by spaces) can be specified. To cancel the cur-
rent request printing on a specific printer, specify the printer name instead of
the request ID. To cancel print requests from one or more specific users, use
the
-u
command-line argument followed by one or more (space- or comma-
separated) user account names. If a printer name is specified after the list of
user accounts, only the print requests submitted by the specified user
account(s) queued on the specified printer are canceled.
Moving Print Requests to Other Printers
The
lpmove(1M)
command is used to move all queued print requests from one
printer queue to another. The following listing shows how to move all queued
print requests from the
laser2
printer to the
laser1
printer:
# lpmove laser2
If a print request ID followed by a printer name is specified as command-line
arguments instead, only the specified print request is moved to the specified
printer.
Assigning Priorities to Print Requests
The priority of a print request can be moved ahead of other print requests in a
queue by assigning it a higher priority. Priorities can be assigned using the
lp
command and specifying the priority with the
-q
command-line argument. The
priority is a number between 0 and 39 (inclusive), where a lower number gives
a higher priority and zero moves the print request to the top of the queue. The
following listing shows how to print the file
abc
and set the priority to 10:
# lp -q 10 abc
request id is laser1-28 (1 file(s))