Squirrel Logo

Dir::Purge - Purge directories to a given number of files

Johan Vromans
Software & Tools


Description

Dir::Purge implements functions to reduce the number of files in a directory according to a strategy. It currently provides one strategy: removal of files by age.

Examples

From the command-line:

  perl -MDir::Purge -e 'purgedir (5, @ARGV)' /spare/backups

From your Perl program:

  use Dir::Purge;
  purgedir ({keep => 5, strategy => "by_age", verbose => 1}, "/spare/backups");

  use Dir::Purge qw(purgedir_by_age);
  purgedir_by_age (5, "/spare/backups");
Current version
1.0
Archived
CPAN sites. The MetaCPAN search engine will find it for you.


© Copyright 2003-2018 Johan Vromans. All Rights Reserved.
software/sw_dirpurge.html last modified 19:22:29 10-May-2004