Mailinglist Archive: opensuse (1476 mails)

< Previous Next >
[opensuse] How to delete everything but the newest 5 files?
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?
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >