Linux基础命令---cancel取消打印任务

cancel

        cancel指令用来取消已经存在的打印任务。

        此命令的适用范围:RedHat、RHEL、Ubuntu、CentOS、Fedora、openSUSE、SUSE。

 

1、语法

        cancel [ -E ]  [ -U username ]  [ -a ]  [ -h hostname[:port] ]  [ -u username ]  [id ]  [ destination ]  [ destination-id ]

        -a -- 取消所有打印任务

 

2、实例

root@localhost /]# lpq                   //查看打印队列

printer01 已准备就绪,正在打印

顺序    所有者   作业     文件                         总大小

1st     root    4      4.c                            1024 字节

active  root    2      5.c                            1024 字节

[root@localhost /]# cancel 4            //取消4号任务

 

[root@localhost /]# lpq                 //查看打印队列,4号任务已经取消

printer01 已准备就绪,正在打印

顺序    所有者   作业     文件                        总大小

active  root    2      5.c                            1024 字节

[root@localhost /]#  

 

posted @ 2020-08-27 17:52  飘零王  阅读(495)  评论(0编辑  收藏  举报