Thursday, March 12, 2009

deleting all the mails when logging in the console mode

Do you need to delete all the mails which shows when you log in to the console. Console in the sense it might be ubuntu, mac, or any linux flavours. You might get something like this..

Last login: Fri Mar 13 10:20:10 on ttys001
You have mail.


And you want to get rid of all the mails right ?

The easy and the simplest way to get rid of all the mails is

echo 'd *' | mail -N

This will delete all the mails present for the current user.

No comments:

Post a Comment