Michael Schilli > Trash-Park > trashpark

Download:
Trash-Park-0.03.tar.gz

Annotate this POD

View/Report Bugs
Source  

NAME ^

    trashpark - Store files safely with querying capability

SYNOPSIS ^

        # Park one or more files or directories (recursively)
    trashpark file ...

        # Display parking history
    trashpark -h
      rw-rw-r-- 2005-08-10 23:45:38   mschilli /tmp/file
      r--r--r-- 2005-08-10 23:46:04   mschilli /tmp/other

        # Like history, just limit list to one or more
        # file basenames (no path will be matched)
    trashpark -l file ...
      rw-rw-r-- 2005-08-10 23:45:38   mschilli /tmp/file

        # Like -l, just show full path names to trashcan 
        # instead of mode, user, move time listing
    trashpark -L file ...
      ~/.trashpark/repo/tmp/file

        # Expire all files in the trash can
        # older than 3 days
    trashpark -e `expr 24 * 3600 * 3`

DESCRIPTION ^

trashpark helps removing files by hiding them in a safe location and providing a query interface.

Without any parameters, trashpark will accept one or more names of files (or directories) to move to .trashpark:

    $ trashpark some/file/somewhere/file.dat

Later on, files in the trashpark can be queried or expired, see details below.

OPTIONS ^

-d trashpark-repository-dir

Set the trash path directory explicitely. If absent, ~/.trashpark will be used.

-h

Show the parking history of the entire trashpath repository chronologically.

-l file ...

Like history, just limit list to one or more file basenames (no path).

-i

Interactive. Confirm every move with the end user.

    $ trashpark -i /tmp/some.dat
    Move /tmp/some.dat to ~/.trashpark/repo/tmp/some.dat ([y]/n)? [y]
-e age_in_seconds

Expire (i.e. delete) all files in the trashpark older than age_in_seconds. To calculate larger time spans, use the expr command line utility:

    $ trashpark -e `expr 24 * 3600 * 3`
-x

Destroy the entire trashpark, including the index.

LEGALESE ^

Copyright 2005 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR ^

2005, Mike Schilli <cpan@perlmeister.com>

syntax highlighting: