1748280 Members
3922 Online
108761 Solutions
New Discussion юеВ

clearing mail.log

 
SOLVED
Go to solution
Timothy P. Jackson
Valued Contributor

clearing mail.log

Hello Everyone,

I normally clear my mail.log file by....

1) /var/adm/syslog/mail.log
2) touch /var/adm/syslog/mail.log
3) reboot the system

The question is, does it hurt to do this during live production and not reboot the system? I need to clear this file but I cannot reboot the system for several weeks, unless something castastrophic happens.

Any help would be greatly appreciated!

Tim
3 REPLIES 3
DCE
Honored Contributor
Solution

Re: clearing mail.log



You can also do a
cat /dev/null > /var/adm/syslog/mail.log

This will zero out the log file, and allow the mail app to keep writing to the log

Sandman!
Honored Contributor

Re: clearing mail.log

another way to null out the mail file...

# >/var/adm/syslog/mail.log
Timothy P. Jackson
Valued Contributor

Re: clearing mail.log

Thanks DCE!

Now why didn't I think of that. I really appreciate your quick response.

Tim