> Has anyone written or found a shell script or the like used to
> automatically delete log files that are a certain number of days old? I'd
> like to keep a solid months worth of log files (31 maybe 35 days or so).
> I'm imagining a shell script that is croned to run once a day deleting
> files older than a certain age. I'm sure I could figure something out but
> thought I'd ask if anyone else is doing something similar.

C'mon Brian!  It's Linux...

find /usr/hlds_l/tfc/logs -name "*.log" -ctime +30 -exec rm -f {} \;

Stick that in your cron and run it once a day.

Jeffrey "botman" Broome
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux

Reply via email to