Quick hint on how to remove directories older than N days
find /backup/ -maxdepth 1 -type d -mtime +7 -exec rm -rf "{}" \;
Given example will remove all subdirectories of directory /backup that are older than 7 days. I use it to remove old backups downloaded from one of my remote servers.
April 8, 2013 — 07:28
I belive that log files can be handled by logrotate. I remember that I had problem with big development.log and test.log in Rails projects.
April 8, 2013 — 09:23
Yes indeed. Log rotate is great – here I was thinking more about an old backups and stuff that might be removed without any harm to our development/monitoring. However you can always combine both solutions :)