1 Apr
2012
1 Apr
'12
01:51
On 3/31/2012 5:03 PM, Brian K. White wrote:
On 3/31/2012 2:06 PM, Andreas wrote:
Hi,
I'd like to let cron clean up a directory that holds hourly backups. So there are 24 new files every day.
I'd need some scripting that sorts the content of this directory and then removes everything but the 5 newest files.
Is there a howto or even sample code that does this?
find /backups -mmin +300 -delete
(find everything in or under /backups whose modify time is older than 300 minutes and delete it)
Ouch. Run tat tomorrow and Poof! All gone. -- _____________________________________ ---This space for rent--- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org