关闭You have new mail in /var/spool/mail提示

在集群上执行qsub命令后,有时会出现You have new mail in /var/spool/mail/misaraty提示。为消除提示,可进行如下操作:

1 以root身份查看mail文件,

ls -lth /var/spool/mail/

2 接着清空mail文件,

cat /dev/null > /var/spool/mail/root
cat /dev/null > /var/spool/mail/misaraty

3 关闭提示,

echo "unset MAILCHECK">> /etc/profile
source /etc/profile

参考:

解决You have new mail in /var/spool/mail/root提示