How Do You Zero out a /var/log/mail File?

Problem scenario
You backed up /var/log/mail to a different file. You want the /var/log/mail file to start empty so you can review it without looking at old activity. What do you do?

Run these four commands:

sudo su -
cd /var/log
> mail

Now you /var/log/mail file will still exist and record activity as normal. It will not have anything in it before the time you ran the above "> mail" command.

Leave a comment

Your email address will not be published. Required fields are marked *