Skip to content
/ rem Public

Get some REM sleep knowing your files are safe

License

Notifications You must be signed in to change notification settings

quackduck/rem

Repository files navigation

Rem

Get some rapid-eye-movement sleep knowing your files are safe.

What is Rem?

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!

Demo

asciicast

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

Installing

Build from source or use:

brew install quackduck/tap/rem

Uninstalling

Simply remove the executable or use:

brew uninstall rem

Usage

Usage: rem [-t/--set-dir <dir>] [--disable-copy] [--permanent | -u/--undo] <file> ...
       rem [-d/--directory | --empty | -h/--help | --version | -l/--list]
       rem --rm-mode [options] [files]
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 the data dir
   -t/--set-dir <dir>     set the data dir and continue
   -q/--quiet             enable quiet mode
   --disable-copy         if files are on a different fs, don't move by copying
   -h/--help              print this help message
   --version              print Rem version
   --rm-mode              enable GNU rm compatibility mode
                          run "rem --rm-mode --help" for more info
   --                     all arguments after this are considered files

Rem stores its data at $XDG_DATA_HOME/rem or .local/share/rem by default. Alternatively, set the data directory using $REM_TRASH or with the -d option.

Thanks

Thanks to u/skeeto for helping me with race conditions and design here

About

Get some REM sleep knowing your files are safe

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •