cancel

cancel

The cancel program removes requests from the LP spool system. If a cancelled request is currently active on a printer, the printing is aborted and the printer is free to print another request. The cancel runstring is as follows:

CI> cancel iddest [iddest...] [-a -e -uuser[@host]] [-i]

where:

 

id

is a request ID, as reported by lpstat, for a request to cancel. You may can

 

cel a request that is owned by another user only if you are a superuser.

dest

is the name of a destination printer or class for which the -a, -e, or -u

 

options apply. If none of these options are given, each destination specified

 

must be the name of a printer; the request currently printing on each named

 

printer will be cancelled. If any dashed options are given then the options are

 

applied to each destination specified. You may cancel a currentlyprinting

 

request that is owned by another user only if you are a superuser.

-a

cancels all of your requests for each dest specified. Each request bound for the

 

named destinations that was generated by your logon will be cancelled.

-e

empties the queue for the named destinations. All requests bound for those

 

destinations are cancelled. You must be a superuser to use this option.

-uuser[@host]cancels all requests for each dest specified that are owned by user user. If the user name is given in the format •user@host", then all requests owned by user user that originated on host host are cancelled, otherwise only requests that originated on the local host are cancelled. More than one -u option may be given to cancel requests for more than one user. You must be a superuser to use this option.

-i

inhibits remote cancels; cancel only local requests destined for remote printers.

 

If this option is not given, remote cancel requests will be sent to remote print

 

ers, as discussed below.

If a dest parameter, or a destination within an id parameter, names a remote printer, then both local and remote cancellation may be performed. Requests on the local system that meet the criteria are cancelled; the requests are queued waiting to be transferred to the remote host. If the -i option is not given, the remote host is asked to cancel any requests on the remote system that meet the criteria. In general, you may only cancel remote requests that you own.

Return Status

The following status is returned by cancel:
$RETURN1

=

the number of errors encountered; zero for none.
$RETURN2

=

the number of requests cancelled locally.

28 LP Spool System