14 Jun
2005
14 Jun
'05
11:04 a.m.
On Mon, 2005-06-13 at 13:11 -0500, sawall wrote:
so, is there another way to do this, or is my best bet to do the following via cron:
find /pathto/logs/* -ctime +7 -exec rm -f {} \; 2> /dev/null
the problem is that the file _is_ changed, new messages appear in it from time to time as otherwise remove_if_older would remove it on its own, therefore -ctime +7 would not be ok. If you'd add somethink like $R_DAY in your filename, then you'd be safe as that would ensure that no new entries will be written to it for a week. -- Bazsi