you have new mail in /var/spool/mail/root !
开发部门有一台闲置的服务器,是老板不知道从哪里搞来的,就放到开发部门让他们做一些测试用,今天开发的同事告诉我,他在登录系统时老是提示you have new mail in /var/spool/mail/root !
我一猜就知道他们肯定又自己写定时任务了,这样的事已经发生过好几回了,一个写代码的,就不要老是鼓捣系统。

打开定时任务一看,果真没有加重定向,结果全都输出到邮件里面了,幸好文件不大。解决办法很简单,定向到/dev/null里面,然后把邮件服务也给他关了。
systemctl stop posfix.service
systemctl disable posfix.service
上回一个货,写了一个定时任务把没加重定向,结果把文件一直给撑到3.5个G,而且还用cat查看,系统一下子就卡在那里不动了,还有一回把磁盘上的inode块都占满了,净给我找事,提一下,如果inode被占满了,通过df -h是无法发现的,会看到磁盘还剩余很多空间,要通过df -i 去查看剩余的inode空间。
如果定时任务没有将结果定向到/dev/null的话,定时任务的输出就会一直给你发邮件;如果你强行把邮件服务关了的话,那么输出的内容就会自动定向到/var/spool/postfix/maildrop里面,每一个文件都很小,结果就会导致这个文件越来越多,直到磁盘的inode区域占满,磁盘也没法用了。所以,最好的办法就是将定时任务的结果定向到空。
you have new mail in /var/spool/mail/root !的更多相关文章
- 解决Centos关闭You have new mail in /var/spool/mail/root提示
昨天搬到阿里云了. 装的系统是Centos 6.3的加固版 今天查看内存的时候 出现一天奇怪的提示 You have new mail in /var/spool/mail/root 有的时候每敲一下 ...
- You have new mail in /var/spool/mail/root 烦不烦你(转)
转自(http://blog.csdn.net/yx_l128125/article/details/7425182) 有时在进入系统的时候经常提示You have new mail in /var/ ...
- Linux关闭You have new mail in /var/spool/mail/root提示
终端远程登陆Linux后经常提示You have new mail in /var/spool/mail/root 这个提示是LINUX会定时查看LINUX各种状态做汇总,每经过一段时间会把汇总的信息 ...
- You have new mail in /var/spool/mail/root消除提示的方法
有时在进入系统的时候经常提示You have new mail in /var/spool/mail/root 你觉得烦人---解决方法: 修改系统配置文件/etc/profile,告诉系统不要去检查 ...
- You have new mail in /var/spool/mail/root 解决烦琐提示的方法
今天写定时任务时,出现奇怪的提示,有的时候每敲一下回车,也出现奇怪的提示 You have new mail in /var/spool/mail/root 阿西吧........表示很烦...究竟是 ...
- 禁止Centos系统You have new mail in /var/spool/mail/root提示
禁止Centos系统You have new mail in /var/spool/mail/root提示 https://blog.csdn.net/oyym_mv/article/details/ ...
- 解决Centos关闭You have new mail in /var/spool/mail/root提示(转)
今天查看内存的时候 出现一天奇怪的提示 You have new mail in /var/spool/mail/root 有的时候每敲一下回车,就出来You have new mail in /va ...
- 解决You have new mail in /var/spool/mail/root提示
终端远程登陆后经常提示You have new mail in /var/spool/mail/root 这个提示是LINUX会定时查看LINUX各种状态做汇总,每经过一段时间会把汇总的信息发送的ro ...
- Linux出现You have new mail in /var/spool/mail/root提示,关闭邮件提示清理内容的解决方案
Linux出现You have new mail in /var/spool/mail/root提示,关闭邮件提示的解决方案 有的时候敲一下回车,就出来You have new mail in /va ...
随机推荐
- 获取当前Linux的外网地址
有时候我们在测试配置外网IP是不是成功时,我们需要使用一些命令,使用 ssh 登录可以查看ip, 还有一种可以使用命令: curl ifconfig.me 进行方便获取,公网IP:真的是非常好的服务: ...
- SSH整合二
结构图 articles模块 实体类Articles.java package com.jt.articles.entity; public class Articles { private Inte ...
- acwing 652. 切蛋糕
题目地址 今天是小Z的生日,同学们为他带来了一块蛋糕. 这块蛋糕是一个长方体,被用不同色彩分成了N个相同的小块,每小块都有对应的幸运值. 小Z作为寿星,自然希望吃到的第一块蛋糕的幸运值总和最大,但小Z ...
- 算法问题实战策略 BOARDCOVER
地址 https://algospot.com/judge/problem/read/BOARDCOVER 解法 DFS 最近似乎在简单DFS上花费太多时间了 首先扫描地图 统计可覆盖的元素个数 如果 ...
- python执行cmd命令
os.system os.system用来执行cmd指令,在cmd输出的内容会直接在控制台输出,返回结果为0表示执行成功 注意:os.system是简单粗暴的执行cmd指令,如果想获取在cmd输出的内 ...
- golang数据结构之冒泡排序
//BubbleSort 冒泡排序 func BubbleSort(arr *[]int) { ; i >= ; i-- { ; j-- { if (*arr)[j] > (*arr)[i ...
- Java连载45-继承举例、方法覆盖
一.Java语言中假设一个类没有显式的继承任何类,那么该类默认继承Java SE库中提供的java.lang.Object类 1.快捷键:Ctrl + shift + T:可以在Myeclipse中查 ...
- LeetCode 350: 两个数组的交集 II Intersection of Two Arrays II
题目: 给定两个数组,编写一个函数来计算它们的交集. Given two arrays, write a function to compute their intersection. 示例 1: 输 ...
- 【zibbix自定义监控】zabbix服务自定义监控mysql的状态信息
由于mysql我安装在zabbix_server服务的主机上,所以下面操作在zabbix服务主机上进行,注意服务主机已经安装了监控服务 实现步骤: 1.修改 zabbix_agentd.conf,添加 ...
- JDBC释放数据库连接
try(){}写法会自动关闭连接 String sql = "select password from user where name = ?"; try(Connection c ...