NAME

trm - A Safer Delete Utility

SYNOPSIS

trm.sh [-Vcdhistvx] [-g graveyard] file|dir [...]

DESCRIPTION

trm is a file- and directory removal tool with several key features:

  • Files are not actually removed, but put in a "graveyard" where they can later be retrieved. By default, this is in ~/.graveyard, but this can be overriden on the command line with the -g option.

  • There is a "test mode" which doesn't actually do anything, but only shows you what the program would do if it actually executed,

  • Deleted items are stored in the graveyard in the same directory hierarchy they were originally in.

  • By default, deleted items have a datetime stamp or "serial number" appended to them. This allows the graveyard to accumulate different versions of a file- or directory tree as they are deleted over time.

  • trm can also be use to simply copy a set of files- and/or directories into the graveyard, without actually removing them from their original location. This is handy if you want to take advantage of the serial number capability and keep versioned "deletions" around, but not actually remove the original files- or directories.

  • Delete or copies can be invoked interactively so you can select which of the targets you actually want affected.

  • You can either run the program as a standalone utility - via the trm.sh program - Or, you can source it - source trm.sh. This loads the trm shell function into the current shell context for subsequent use from the command line or another program.

  • You can put commonly used command line options in the $TRM environment variable. For instance, you may want to default to test mode operation by doing something like export TRM="-t".

OPTIONS

You can override the program's default behavior with a number of command line options:

-V display version control commit ID
-c copy targets to graveyard, don't remove them
-d empty the current graveyard (permanent removal)
-h display this help screen
-g graveyard use named graveyard instead of default
-i interactive removal/copy
-s don't generate serial number suffixes
-t test mode, just show what would be done
-v verbose mode - be noisy
-x execute, overrides previous -t

OPERATING NOTES

But:

trm /local/bin/x # Moves x to ~/,graveyard/usr/local/bin/x

BUGS AND MISFEATURES

None known as of this release.

AUTHOR

Tim Daneliuk
trm@tundraware.com

DOCUMENT REVISION INFORMATION

$Id: '1ca95bc tundra Fri Oct 28 09:27:57 2016 -0500'

This document was produced with emacs, RestructuredText, and TeX Live.

You can find the latest version of this program at:

http://www.tundraware.com/Software/trm