Linux system mail viewing and emptying

Source: Internet
Author: User
Tags rsync

The following prompt often appears when you log in or execute a command

You have mail in/var/spool/mail/root

Tip You have system mail not viewed


View system messages

#mail

Heirloom Mail Version 12.4 7/29/08. Type? For help.

"/var/spool/mail/root": 15110 messages 15105 Unread

1 cron Daemon Wed Jul 23:27 23/870 "cron <[email protected]>/usr/sbin/ntpdate cn.pool.ntp.org > /dev/null "

2 cron Daemon Thu Jul 02:26 23/869 "cron <[email protected]>/usr/sbin/ntpdate cn.pool.ntp.org > /dev/null "

>u 3 cron Daemon Thu Jul 03:12 23/868 "cron <[email protected]>/usr/sbin/ntpdate cn.pool.ntp.or G >/dev/null "

U 4 cron Daemon Thu Jul 03:34 23/868 "cron <[email protected]>/usr/sbin/ntpdate cn.pool.ntp.org & Gt /dev/null "

U 5 cron Daemon Thu Jul 03:47 23/868 "cron <[email protected]>/usr/sbin/ntpdate cn.pool.ntp.org & Gt /dev/null "


Use the message number in front of N to view the message, such as N 10

& N 10

Message 10:

From [email protected] Thu Jul 31 11:24:02 2014

Return-path: <[email protected]>

X-original-to:root

delivered-to: [Email protected]

From: [Email protected] (Cron Daemon)

To: [Email protected]

Subject:cron <[email protected]>/usr/sbin/ntpdate cn.pool.ntp.org >/dev/null


Exit message

& Q

Held 15110 Messages In/var/spool/mail/root

You have mail in/var/spool/mail/root


Clear Mail

If you empty the root email, enter /var/spool/mail

/var/spool/mail

#ll

List all users ' messages

# LL

Total 18680

-RW-RW----. 1 Info Mail 0 Dec 13:17 Info

-RW-RW----. 1 mysql Mail 0 Jul 22:27 MySQL

-RW-------. 1 root mail 19116551 Jan 5 10:56 Root

-RW-RW----. 1 rsync Mail 0 Jul 22:30 rsync

-RW-RW----. 1 upload mail 0 Dec 08:18 upload

# echo > Root

It is best not to delete the root file, just empty it.


# Mail

No Mail for Root



This article is from the "Flying Life" blog, please be sure to keep this source http://3619523.blog.51cto.com/3609523/1599215

Linux system mail viewing and emptying

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.