The cancel command includes information for the AIX Print Subsystem cancel and the System V Print Subsystem cancel .
AIX Print Subsystem cancel Command
Cancels requests to a line printer.
cancel { JobID ... | PrinterName }
or
cancel JobID QueueName
The cancel command cancels line printer requests that were made by the lp command.
Specifying the following cancels the local print jobs:
In AIX 4.3.2 and above, qstatus was enhanced to improve the administration of local queues showing duplicate 3-digit job numbers. You can use the -W flag with the enq, qchk, lpstat, and lpq status commands to display more job number digits.
If your queue display shows duplicate 3-digit job numbers, use qchk -W to list job numbers with greater precision. You can then cancel a specific job.
For example, qchk might display job number 123 twice while, qchk -W would display job number 1123 and 2123. If you want to cancel job number 2123, specifying cancel 123, causes the qdaemon to cancel the first matching job number it finds in its internal list, which may be 1123. By having the additional information that the -W flag provides, you can cancel a specific job number.
And for remote print jobs, both the JobID and remote QueueName must be specified in order to explicitly cancel a job on a remote queue.
Notes:
This command returns the following exit values:
0 | Successful completion. |
>0 | An error occurred. |
/var/spool/qdaemon/* | Contains temporary copies of enqueued files. |
/var/spool/lpd/qdir/* | Contains job description files for print jobs. |
/usr/bin/cancel | Contains the command file. |
The enable command, enq command, lp command, lpstat command, qcan command.
Canceling a Print Job (qcan Command) in AIX 5L Version 5.2 System User's Guide: Operating System and Devices.
Printers, Print Jobs, and Queues Overview for Users in AIX 5L Version 5.2 System User's Guide: Operating System and Devices.
System V Print Subsystem cancel Command
Cancel print requests
cancel [request-IDs] [printers]
cancel -u login-IDs [printers]
The cancel command allows users to cancel print requests previously sent with the lp command. The first form of cancel permits cancellation of requests based on their request-ID. The second form of cancel permits cancellation of requests based on the login-ID of their owner.
The cancel command cancels requests for print jobs made with the lp command. The first form allows a user to specify one or more request-IDs of print jobs to be canceled. Alternatively, the user can specify one or more printers, on which only the currently printing job will be canceled if it is the user's job.
The second form of cancel cancels all jobs for users specified in login-IDs. In this form the printers option can be used to restrict the printers on which the users' jobs will be canceled. Note that in this form, when the printers option is used, all jobs queued by the users for those printers will be canceled. A printer class is not a valid argument.
A user without special privileges can cancel only requests that are associated with his or her own login ID; To cancel a request, a user issues the command:
cancel -u login-ID [printer]
This command cancels all print requests associated with the login-ID of the user making the request, either on all printers (by default) or on the printer specified.
Administrative users with the appropriate privileges can cancel jobs submitted by any user by issuing the following types of commands:
A remote job can be canceled only if it originated on the client system; that is, a server system can cancel jobs that came from a client, and a client system can cancel jobs it sent to a server.
In any of these cases, the cancellation of a request that is currently printing frees the printer to print the next request.
The enable command, enq command, lp command, lpstat command, qcan command.
Canceling a Print Job (qcan Command) in AIX 5L Version 5.2 System User's Guide: Operating System and Devices.
Printers, Print Jobs, and Queues Overview for Users in AIX 5L Version 5.2 System User's Guide: Operating System and Devices.