网站首页 > 文章精选 正文
linux 命令cancel 介绍和使用案例
Linux 中的 cancel 命令用于取消打印作业
命令介绍
cancel 命令的基本语法如下:
text
cancel [options] [destination] [id]
- options:可选项,用于指定取消作业的方式。
- destination:打印机名称或类名。
- id:要取消的作业 ID。
常用选项包括:
- -a:取消指定打印机上的所有作业。
- -E:连接服务器时强制使用加密。
- -h hostname[:port]:指定备用服务器。
- -u username:取消指定用户的作业
命令安装部署:
root@meng:~# cancel
Command 'cancel' not found, but can be installed with:
apt install cups-client # version 2.4.1op1-1ubuntu4.10, or
apt install lprng # version 3.8.B-5
root@meng:~# apt install lprng
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
magicfilter lprng-doc
The following NEW packages will be installed:
lprng
0 upgraded, 1 newly installed, 0 to remove and 216 not upgraded.
Need to get 540 kB of archives.
After this operation, 3154 kB of additional disk space will be used.
Get:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu jammy/universe amd64 lprng amd64 3.8.B-5 [540 kB]
Fetched 540 kB in 1s (634 kB/s)
Preconfiguring packages ...
Selecting previously unselected package lprng.
(Reading database ... 75093 files and directories currently installed.)
Preparing to unpack .../lprng_3.8.B-5_amd64.deb ...
Unpacking lprng (3.8.B-5) ...
Setting up lprng (3.8.B-5) ...
Processing triggers for man-db (2.10.2-1) ...
Scanning processes...
Scanning linux images...
Running kernel seems to be up-to-date.
No services need to be restarted.
No containers need to be restarted.
No user sessions are running outdated binaries.
No VM guests are running outdated hypervisor (qemu) binaries on this host.
在没有安装打印机驱动会提示报错:
root@meng:~# cancel
Read_file_list: cannot stat required or included file '/etc/printcap' - No such file or directory
root@meng:~# cancel -a
Read_file_list: cannot stat required or included file '/etc/printcap' - No such file or directory
root@meng:~# systemctl restart cups
Failed to restart cups.service: Unit cups.service not found.
root@meng:~# systemctl restart cups
Failed to restart cups.service: Unit cups.service not found.
root@meng:~# tail -n 50 /var/log/cups/error_log
tail: cannot open '/var/log/cups/error_log' for reading: No such file or directory
root@meng:~#
- 上一篇: 完全掌握请求控制:Axios 取消请求的2种有效方法
- 下一篇: 什么是AQS?
猜你喜欢
- 2025-01-03 ant design Modal关闭时清除数据的解决方案
- 2025-01-03 Flink状态管理详解:Keyed State和Operator List State深度解析
- 2025-01-03 电气自动化专业词汇中英文对照表
- 2025-01-03 事务相关知识集锦
- 2025-01-03 FlexSim常用脚本语言汇总--搜集最常用
- 2025-01-03 停止javascript的ajax请求,取消axios请求,取消reactfetch请求
- 2025-01-03 MySQL进阶垫脚石:线程长时间处于killed状态怎么破?
- 2025-01-03 ReentrantLock的底层原理
- 2025-01-03 还搞不定 SQL 阻塞与超时?早晚得出事!
- 2025-01-03 细说ReactiveCocoa的冷信号与热信号(二):为什么要区分冷热信号
- 最近发表
- 标签列表
-
- newcoder (56)
- 字符串的长度是指 (45)
- drawcontours()参数说明 (60)
- unsignedshortint (59)
- postman并发请求 (47)
- python列表删除 (50)
- 左程云什么水平 (56)
- 计算机网络的拓扑结构是指() (45)
- 稳压管的稳压区是工作在什么区 (45)
- 编程题 (64)
- postgresql默认端口 (66)
- 数据库的概念模型独立于 (48)
- 产生系统死锁的原因可能是由于 (51)
- 数据库中只存放视图的 (62)
- 在vi中退出不保存的命令是 (53)
- 哪个命令可以将普通用户转换成超级用户 (49)
- noscript标签的作用 (48)
- 联合利华网申 (49)
- swagger和postman (46)
- 结构化程序设计主要强调 (53)
- 172.1 (57)
- apipostwebsocket (47)
- 唯品会后台 (61)
- 简历助手 (56)
- offshow (61)