Get some rapid-eye-movement sleep knowing your files are safe.
Rem is a CLI trash which makes it ridiculously easy to recover files. We've all had that moment when we've deleted something we realised we shouldn't have. It sucks. Let's fix that!
Let's say we have the following file structure
.
├── someDir
│ └── someFile
└── someFile
Next, we want to delete someDir
. Simple!
rem someDir
Now it looks like this:
.
└── someFile
Oh no! We actually needed that directory!
rem --undo someDir
Back to:
.
├── someDir
│ └── someFile
└── someFile
It's really that easy.
You can also delete files of the same name with no problem:
rem someDir/someFile someFile
Build from source or use:
brew install quackduck/tap/rem
Simply remove the executable or use:
brew uninstall rem
Rem stores its trash by default at ~/.remTrash
.
Usage: rem [-t/--set-trash <dir>] [--disable-copy] [--permanent | -u/--undo] <file> ...
rem [-d/--directory | --empty | -h/--help | -v/--version | -l/--list]
Options:
-u/--undo restore a file
-l/--list list files in trash
--empty empty the trash permanently
--permanent delete a file permanently
-d/--directory show path to trash
-t/--set-trash <dir> set trash to dir and continue
--disable-copy if files are on a different fs, don't rename by copy
-h/--help print this help message
-v/--version print Rem version
Thanks to u/skeeto for helping me with race conditions and design here