[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to properly empty log files



T o n g wrote:
Hi,

My /var/log/mail.err is very big due to a misconfiguration error. However, I can't simply remove it because it is "owned" by rsyslogd:

$ lsof | grep mail.err rsyslogd 4387 root 10w REG 8,9 17605899 247416 /var/log/mail.err

So, how to properly empty log files?

thanks


logrotate -f should do it

or remove/rename the file and then restart syslog and reload the mail daemon (postfix,exim,ect)

Sam


Reply to: