cancel - cancel printer requests (LEGACY)
cancel [ID ...] printer ... cancel ID ...[printer ...]
The cancel utility cancels printer requests that were made by an lp command. The cancellation of a request that is currently printing frees the printer to print its next available request.Cancelling requests from other users requires appropriate privileges. For each request successfully cancelled by a user who did not submit the request, the submitter may be notified that the request was cancelled.
The cancel utility cannot reliably cancel print requests in all conceivable circumstances. When the printer is under the control of another operating system or resides on a remote system across a network, it might not be possible to affect the status of the print job after it has left the control of the local operating system. Even on local printers, spooling hardware in the printer may make it appear that the print job has been completed long before the final page is printed.
None.
The following operands are supported:
- ID
- A request ID, as returned by lp. Specifying a request ID cancels the associated request even if it is currently printing.
- printer
- A printer name (for a complete list of printer names, use lpstat). Specifying a printer cancels the request that is currently printing on that printer.
Not used.
None.
The following environment variables affect the execution of cancel:
- LANG
- Provide a default value for the internationalisation variables that are unset or null. If LANG is unset or null, the corresponding value from the implementation-dependent default locale will be used. If any of the internationalisation variables contains an invalid setting, the utility will behave as if none of the variables had been defined.
- LC_ALL
- If set to a non-empty string value, override the values of all the other internationalisation variables.
- LC_CTYPE
- Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single- as opposed to multi-byte characters in arguments).
- LC_MESSAGES
- Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error, and informative messages written to standard output.
- NLSPATH
- Determine the location of message catalogues for the processing of LC_MESSAGES .
Default.
The standard output is a text file containing the status of each cancellation request, in an unspecified format.
Used only for diagnostic messages.
If mail notification is used to inform users of their requests being cancelled by other users, mail files will be modified.
None.
The following exit values are returned:
- 0
- Successful completion.
- >0
- An error occurred.
Default.
None.
None.
None.
lp, lpstat, mailx.