Previous | Table of Contents | Next |
You can request different types of printing status information by using the lpstat command. Table 6-10 summarizes the frequently used options for the lpstat command. Use these options individually or combine them in any order on the command line. When you combine options, use a space between options and repeat the hyphen (-). For example, to show a long list of status for an individual printer, type lpstat -p printer-name -l and press Return. See the lpstat(1) manual page for a complete list of options.
Option | Description |
---|---|
-a | Accept. Show whether print destinations are accepting requests. |
-c | Class. Show classes and their members. |
-d | Destination. Show default destination. |
-f | Forms. Show forms. |
-o | Output. Show status of output. |
-p [list] [-D] [-l] | Printer/description/long list. Show status of printers. |
-r | Request. Request scheduler status. |
-R | Show position of job in the queue. |
-S | Sets. Show character sets. |
-s | Status. Show status summary. |
-u [username] | User. Show requests by user. |
-v | Show devices. |
Use the cancel command to cancel a print request while it is in the queue or while it is printing. To cancel a request, you need to know its request ID. The request ID always includes the name of the printer, a hyphen, and the number of the print request. When you submit the print request, the request ID is displayed. If you do not remember your request ID, type lpstat and press Return. Only the user who submitted the request, or someone logged in as root or lp, can cancel a print request.
To cancel a print request, type cancel request-ID and press Return. A message is displayed telling you that the request is canceled. The next job in the queue begins printing.
In this example, two print requests are canceled:
elm% cancel pinecone-3 pinecone-4 request "pinecone-3" cancelled request "pinecone-4" cancelled elm%
You can also cancel just the job that currently is printing (if you submitted it) by typing the printer name in place of the request ID. Type cancel printer-name and press Return. A message is displayed telling you that the request is canceled. The next job in the queue begins printing.
In this example, the currently printing request has been canceled:
elm% cancel pinecone request "pinecone-3" cancelled elm%
As system administrator, you can log in as root or lp and cancel the currently printing request by using the printer name as the argument for the cancel command.
Previous | Table of Contents | Next |