美文网首页
Ubuntu /var/spool/mqueue-client

Ubuntu /var/spool/mqueue-client

作者: R_X | 来源:发表于2022-10-25 10:58 被阅读0次

Ubuntu /var/spool/mqueue-client 目录下会有大量文件, 产生的原因是: cron 任务中有输出内容时,默认会通过sendmail 发送,但是如果服务器上没有 sendmail 服务时,会将发送内容保存到这个目录内。

1、处理方式: 修改 /etc/crontab 内的任务,将输入内容抛弃

# 在每个任务后面加上下面命令
> /dev/null >&2

解释: 1、 > 重定向的意思,表示将输出的内容写入到 /dev/null中,但是 /dev 目录下并没有null这个文件,所以这个意思就是把内容抛弃掉。
2、>&2 实际是 1>&2的简写。 1: 表示标准输出; 2: 表示错误输出;
3、>&2 的意思是: 1 的输出处理方式 跟 2 一致。

2、 /etc/crontab 修改示例

17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly >/dev/null 2>&1
25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) >/dev/null 2>&1
47 6    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) >/dev/null 2>&1
52 6    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) >/dev/null 2>&1

相关文章

  • Ubuntu /var/spool/mqueue-client

    Ubuntu /var/spool/mqueue-client 目录下会有大量文件, 产生的原因是: cron 任...

  • /var/spool/clientmqueue目录~清理

    查找占用空间大的目录/var/spool/clientmqueue.... 然后我就想/var/spool/cli...

  • 反弹shell

    每一分钟执行一次 ubuntu目录:/var/spool/cron/crontabs/ 每分钟反弹一个sh cen...

  • 空间不足

    发现 /var/spool/postfix/maildrop/ 比较大 service postfix stop ...

  • 挖矿木马清除

    cd /var/spool/cron/root 注释掉 #*/5 * * * * curl -fsSL http:...

  • 备份与恢复

    1.需要备份的数据 1.目录:/root//home//var/spool/mail//etc/其他:/var/l...

  • linux下crond调度

    编辑/var/spool/cron/root文件 基本格式 : 可以打開/var/log/cron文件查看任務是否...

  • centos系统日志

    一、/var目录 一些数据库如MySQL则在/var/lib下,用户未读的邮件的默认存放地点为/var/spool...

  • linux_计划任务

    文件位置 /var/spool/cron 查看计划列表 crontab -l 格式说明 参考: https://b...

  • Linux 中 /var/spool/postfix/maild

    摘要 一台运维主机上面没有跑什么特殊服务,所以没有添加监控告警。今突然执行命令执行不了发现是因为磁盘慢了导致。排错...

网友评论

      本文标题:Ubuntu /var/spool/mqueue-client

      本文链接:https://www.haomeiwen.com/subject/hhbnzrtx.html