← 返回命令列表

Linux command

cancel 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Cancel the current print job on the default printer

cancel

Cancel a specific print job by ID

cancel [job_id]

Cancel a print job on a specific printer

cancel [printer_name]-[job_id]

Cancel all print jobs on a specific printer

cancel -a [printer_name]

Cancel all print jobs on all printers

cancel -a

Cancel all jobs owned by a specific user

cancel -u [username]

说明

cancel is a CUPS command that cancels print jobs. Without arguments, it cancels the currently printing job on the default destination. Jobs can be specified by job ID, destination printer, or both. Job IDs are assigned by the print system and can be viewed with lpstat. The destination-id format combines the printer name and job ID (e.g., "myprinter-42").

参数

-a
Cancel all jobs on the specified destination, or all destinations if none specified
-E
Force encryption when connecting to the server
-h _hostname_:_port_
Specify alternate server
-u _username_
Cancel jobs owned by the specified user
-U _username_
Specify the username for authentication
-x
Delete job data files in addition to canceling

FAQ

What is the cancel command used for?

cancel is a CUPS command that cancels print jobs. Without arguments, it cancels the currently printing job on the default destination. Jobs can be specified by job ID, destination printer, or both. Job IDs are assigned by the print system and can be viewed with lpstat. The destination-id format combines the printer name and job ID (e.g., "myprinter-42").

How do I run a basic cancel example?

Run `cancel` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -a do in cancel?

Cancel all jobs on the specified destination, or all destinations if none specified