在 CentOS 里,“spool” 本身不是一个服务,而是用于缓存打印、邮件等任务的目录/机制。你说的“停止 spool”,通常是指下面几种情况之一:
如果是打印机相关:
# 停止 CUPS 打印服务
systemctl stop cups
# 禁止开机启动
systemctl disable cups
查看打印队列:
lpstat -o
清空打印队列(停止 spool 中的任务):
cancel -a
如果是邮件队列(/var/spool/mail):
systemctl stop postfix
systemctl disable postfix
清空邮件队列:
postsuper -d ALL
systemctl stop sendmail
systemctl disable sendmail
如果是 /var/spool/cron:
systemctl stop crond
systemctl disable crond
⚠️ 谨慎操作:
# 例如清空打印 spool
rm -rf /var/spool/cups/*
可以告诉我:
我可以给你精确命令。