1 Apr
2012
1 Apr
'12
00:03
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) -- bkw -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org