No description
Find a file
2016-10-21 02:25:20 -07:00
ci Fix unwrap on err in seance 2016-10-17 20:23:33 -07:00
src Fix logic in delete_lines_from_record 2016-10-21 02:25:20 -07:00
.travis.yml Build for 64-bit osx 2016-10-18 00:09:18 -07:00
Cargo.toml Bump version 2016-10-17 04:58:06 -07:00
LICENSE Add license 2016-09-17 22:56:23 -07:00
README.org Edit install notes 2016-10-18 00:07:34 -07:00

rip (Rm ImProved)

https://img.shields.io/crates/v/rm-improved.svg https://travis-ci.org/nivekuil/rip.svg?branch=master

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 mounted on an in-memory filesystem, (as /tmp is in Arch Linux), 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 the .record, found in the top level of the graveyard.

Installation

Get a binary release or run cargo install rm-improved with a nightly compiler.

Usage

USAGE:
    rip [FLAGS] [OPTIONS] [TARGET]...

FLAGS:
    -d, --decompose    Permanently delete (unlink) the entire graveyard
    -h, --help         Prints help information
    -i, --inspect      Print some info about TARGET before prompting for action
    -r, --resurrect    Undo the last removal by the current user
    -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:
    <TARGET>...    File or directory to remove

Notes

  • In general, a deletion followed by a --resurrect should be idempotent.
  • You probably shouldn't alias rm to rip. rm -r is two characters longer, anyway.