backup-rotate
The backup-rotate
bash script deletes oldest of files
having the same prefix (or being in the same directory), while keeping files
which are below a simple threshold:
- age in days (since last modification),
- number of files,
- or both.
The current version of backup-rotate
uses find
to locate the files to consider for deletion, so it does not suffer from
the limitation of maximum parameters as with shell expansion.
If you are looking for a more sophisticated solution for less files, but including various retention schedules, try fileprune, written in C, by Diomidis Spinellis.
Usage
See the man page for usage. There is also a HTML-formatted man backup-rotate(1) available.
License
backup-rotate is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Download
Name | Last modified | Size | Description | |
backup-rotate-1.6.tar.gz | 12-Aug-2008 00:04 | 16K | ||
backup-rotate-1.7.tar.gz | 17-Sep-2009 20:48 | 16K | ||
backup-rotate-1.8.tar.gz | 13-Jan-2011 21:10 | 16K |