Shell script/cmd to remove old folders in a directory?
Hello,
Hoping someone could help me here, we have a back-up that takes snapshots of one of our DB servers and copies over the files to another server's directory for back-up. This directory can grow rapidly with many back-ups as they are taken on a 5-minute timer. I was looking for a shell script/cmd line to remove any folders in a specific directory that is older than 10 days. Anyone able to help? Thank you. |
Code:
find /dir/to/backups -mtime +10 -exec echo rm {} + |
All times are GMT -5. The time now is 02:13 AM. |