No description
Find a file
Kevin Liu f20d9e8bb5 Return line in histfile only if file exists
This calls stat() for every single manually deleted file, which may get
expensive if a graveyard and histfile are significantly out of sync from
mv's and rm's.
2016-10-15 18:19:25 -07:00
src Return line in histfile only if file exists 2016-10-15 18:19:25 -07:00
Cargo.toml Bump version 2016-10-14 18:41:19 -07:00
LICENSE Add license 2016-09-17 22:56:23 -07:00
README.org Add badge 2016-10-04 04:55:59 -07:00

rip (Rm ImProved)

https://img.shields.io/crates/v/rm-improved.svg

Deleted files get sent to the graveyard (/tmp/.graveyard by default, under their absolute path) instead of being unlinked, giving you a chance to recover them.

No data is overwritten. If files that share the same path are deleted, they will be renamed as numbered backups.

If you want to put the graveyard somewhere else (like ~/.local/share/Trash), you have two options, in order of precedence:

  1. Alias rip to rip --graveyard ~/.local/share/Trash
  2. Set the environment variable $GRAVEYARD to ~/.local/share/Trash

This can be a good idea because if the graveyard is in a tmpfs mount, deleting large files can quickly fill up your RAM. It's also much slower to move files across filesystems, although the delay should be minimal with an SSD.

A deletion log is kept in .rip_history, found in the top level of the graveyard.

Installation

Get a binary release (x86_64) or build it with cargo install rm-improved.

Usage

USAGE:
    rip [FLAGS] [OPTIONS] <SOURCE>...

FLAGS:
        --decompose    Permanently delete (unlink) the entire graveyard
    -h, --help         Prints help information
    -r, --resurrect    Undo the last deletion
    -s, --seance       List all objects in the graveyard that were sent from the current directory
    -V, --version      Prints version information

OPTIONS:
        --graveyard <graveyard>    Directory where deleted files go to rest

ARGS:
    <SOURCE>...    File or directory to remove

Why is there no --interactive option?

Asking for forgiveness is easier than asking for permission.