Tuesday, December 2, 2008

Samba Recycle Bin - AutoDelete Old Files

As I mentioned a few weeks ago, I have setup the Recycle Bin functionality on my Samba server. Rather than letting the Recycle Bin folder fill up over time, I wanted to have it delete files older than one week once per day. To do so, I added this line to my crontab:

0 15 * * * /usr/bin/find /samba/phoenix/.recyclebin -mtime +7 -print -type f -delete

Files older than 7 days are now deleted automatically everyday at 12:15AM.



1 comment:

TerryHobart said...

Thanks. This is exactly what I was looking for.