Sha256: 32cb3a382ef285db09046cbe9e2f14838295ca56fbfe0b18b242cdb6d9868d38

Contents?: true

Size: 1.41 KB

Versions: 4

Compression:

Stored size: 1.41 KB

Contents

== Synopsis

Executable to delete files fitting certain criteria.

The intended purpose is to delete backups older than a certain date,
whilst keeping hourly, daily or weekly and so on backups.

Specifying an option like --hourly will keep the first file of the hour
and delete the rest of the files created within the same hour,
provided that the those files were created before the threshold date.

The executable does not itself create any backups, it is only
intended for cleaning up existing ones.

== Usage

  clean_files file_paths [options]

For help use: clean_files -h
== Options

  -v, --verbose     Print name of files deleted
  -p, --pretend     Implies -v, only prints what files would have been deleted
  -r, --recursive   Delete directories as well as files
  -t, --threshold   Time ago in days for when to start deleting files
                    File newer than this date are never deleted.
                    The default is 30 days.

                    For example:

                   -t 10 or --threshold=30

  -H, --hourly      Keep hourly files
  -D, --daily       Keep daily files
  -W, --weekly      Keep weekly files
  -M, --monthly     Keep monthly files
  -Y, --yearly      Keep yearly files

== Examples

  clean_files /backups/sql/*.sql --threshold 60 --daily
  clean_files /Users/me/Downloads/* --pretend --verbose --recursive -t 10

== Copyright

Copyright (c) 2009 AlphaSights Ltd. See LICENSE for details.

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
clean_files-1.2.1 README.rdoc
clean_files-1.1.1 README.rdoc
clean_files-1.1.0 README.rdoc
clean_files-1.0.1 README.rdoc