Am 09.10.2011 12:09, schrieb Chris Boot:
On 09/10/2011 04:31, Dwight Hopkins wrote:
I run a cron job every day at midnight:
*cd public_html/tf2/tf/replays&& find -mtime +7 -exec rm {} \;*
This will delete all files in the replay folder older than 7 days.
Obviously
change the path to whatever your own path is and adjust the time to your
liking.
I'm a linux noob though, so there may be a more efficient way to do it.
Slightly more efficient:
find public_html/tf2/tf/replays -mtime +7 -print0 | xargs -0 rm
HTH,
Chris
Or even faster case it does not spawn "rm" for every file:
find public_html/tf2/tf/replays -mindepth 1 -mtime +7 -delete
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux