在登录或执行命令时,经常会出现下面这个提示
You have mail in /var/spool/mail/root
提示你有系统邮件没有查看
查看系统邮件
Heirloom Mail version 12.4 7/29/08. Type ? for help.
"/var/spool/mail/root": 15110 messages 15105 unread
1 Cron Daemon Wed Jul 30 23:27 23/870 "Cron <root@localhost> /usr/sbin/ntpdate cn.pool.ntp.org > /dev/null"
2 Cron Daemon Thu Jul 31 02:26 23/869 "Cron <root@localhost> /usr/sbin/ntpdate cn.pool.ntp.org > /dev/null"
>U 3 Cron Daemon Thu Jul 31 03:12 23/868 "Cron <root@localhost> /usr/sbin/ntpdate cn.pool.ntp.org > /dev/null"
U 4 Cron Daemon Thu Jul 31 03:34 23/868 "Cron <root@localhost> /usr/sbin/ntpdate cn.pool.ntp.org > /dev/null"
U 5 Cron Daemon Thu Jul 31 03:47 23/868 "Cron <root@localhost> /usr/sbin/ntpdate cn.pool.ntp.org > /dev/null"
使用n 前面的邮件编号查看相应邮件,如 n 10
& n 10
Message 10:
From root@localhost.localdomain Thu Jul 31 11:24:02 2014
Return-Path: <root@localhost.localdomain>
X-Original-To: root
Delivered-To: root@localhost.localdomain
From: root@localhost.localdomain (Cron Daemon)
To: root@localhost.localdomain
Subject: Cron <root@localhost> /usr/sbin/ntpdate cn.pool.ntp.org > /dev/null
退出邮件
& q
Held 15110 messages in /var/spool/mail/root
You have mail in /var/spool/mail/root
清空邮件
如清空root的邮件,进入/var/spool/mail
#cd /var/spool/mail
#ll
列出所有用户的邮件
# ll
total 18680
-rw-rw----. 1 info mail 0 Dec 24 13:17 info
-rw-rw----. 1 mysql mail 0 Jul 30 22:27 mysql
-rw-------. 1 root mail 19116551 Jan 5 10:56 root
-rw-rw----. 1 rsync mail 0 Jul 31 22:30 rsync
-rw-rw----. 1 upload mail 0 Dec 25 08:18 upload
# echo > root
最好别删除root文件,只需要清空即可。
No mail for root
本文出自 “飞扬的人生” 博客,请务必保留此出处http://3619523.blog.51cto.com/3609523/1599215
原文地址:http://3619523.blog.51cto.com/3609523/1599215