Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/quackduck/rem
Get some REM sleep knowing your files are safe
https://github.com/quackduck/rem
rem rm safe trash
Last synced: 2 days ago
JSON representation
Get some REM sleep knowing your files are safe
- Host: GitHub
- URL: https://github.com/quackduck/rem
- Owner: quackduck
- License: mit
- Created: 2021-02-10T13:31:55.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-27T02:30:50.000Z (almost 2 years ago)
- Last Synced: 2024-10-28T09:53:09.159Z (13 days ago)
- Topics: rem, rm, safe, trash
- Language: Go
- Homepage:
- Size: 105 KB
- Stars: 48
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-hackclub - Rem - [@quackduck](https://github.com/quackduck) - **(Go)** _The CLI trash that makes it ridiculously easy to recover files_ (CLI Tools)
README
# 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](https://asciinema.org/a/390479.svg)](https://asciinema.org/a/390479?speed=2)
Let's say we have the following file structure
```text
.
├── someDir
│ └── someFile
└── someFile
```Next, we want to delete `someDir`. Simple!
```shell
rem someDir
```Now it looks like this:
```text
.
└── someFile
```
Oh no! We actually needed that directory!
```shell
rem --undo someDir
```
Back to:
```text
.
├── someDir
│ └── someFile
└── someFile
```
It's really _that_ easy.You can also delete files of the same name with no problem:
```shell
rem someDir/someFile someFile
```## Installing
Build from source or use:
```shell
brew install quackduck/tap/rem
```
## Uninstalling
Simply remove the executable or use:
```shell
brew uninstall rem
```## Usage
```text
Usage: rem [-t/--set-dir ] [--disable-copy] [--permanent | -u/--undo] ...
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 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](https://www.reddit.com/user/skeeto/) for helping me with race conditions and design [here](https://www.reddit.com/r/golang/comments/lixr6k/rem_the_trash_cli_that_makes_it_ridiculously_easy/gn7z86z?utm_source=share&utm_medium=web2x&context=3)