| 1 |
Dir::Purge implements functions to reduce the number of files in a |
| 2 |
directory according to a strategy. It currently provides one strategy: |
| 3 |
removal of files by age. |
| 4 |
|
| 5 |
EXAMPLES |
| 6 |
======== |
| 7 |
|
| 8 |
From the command-line: |
| 9 |
|
| 10 |
perl -MDir::Purge -e 'purgedir (5, @ARGV)' /spare/backups |
| 11 |
|
| 12 |
From your Perl program: |
| 13 |
|
| 14 |
use Dir::Purge; |
| 15 |
purgedir ({keep => 5, strategy => "by_age", verbose => 1}, "/spare/backups"); |
| 16 |
|
| 17 |
use Dir::Purge qw(purgedir_by_age); |
| 18 |
purgedir_by_age (5, "/spare/backups"); |
| 19 |
|
| 20 |
AVAILIBILITY |
| 21 |
============ |
| 22 |
|
| 23 |
The Comprehensive Perl Archive Network (CPAN), see |
| 24 |
"http://www.perl.com/CPAN/authors/Johan_Vromans". |
| 25 |
|
| 26 |
The kit is named Dir-Purge-x.yy.tar.gz, where x.yy is the version |
| 27 |
number. |
| 28 |
|
| 29 |
COPYRIGHT AND DISCLAIMER |
| 30 |
======================== |
| 31 |
|
| 32 |
Module Dir::Purge is Copyright 2000,2005 by Squirrel Consultancy. |
| 33 |
This program is free software; you can redistribute it and/or |
| 34 |
modify it under the terms of the Perl Artistic License or the |
| 35 |
GNU General Public License as published by the Free Software |
| 36 |
Foundation; either version 2 of the License, or (at your option) any |
| 37 |
later version. |
| 38 |
|
| 39 |
------------------------------------------------------------------- |
| 40 |
Johan Vromans [email protected] |
| 41 |
Squirrel Consultancy Haarlem, the Netherlands |
| 42 |
http://www.squirrel.nl http://www.squirrel.nl/people/jvromans |
| 43 |
------------------ "Arms are made for hugging" -------------------- |