{"id":13503821,"url":"https://github.com/nivekuil/rip","last_synced_at":"2025-05-14T19:08:47.057Z","repository":{"id":38375826,"uuid":"66990157","full_name":"nivekuil/rip","owner":"nivekuil","description":" A safe and ergonomic alternative to rm","archived":false,"fork":false,"pushed_at":"2024-04-08T14:17:34.000Z","size":130,"stargazers_count":1542,"open_issues_count":26,"forks_count":63,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-05-14T19:08:46.475Z","etag":null,"topics":["trash"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nivekuil.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-31T01:12:05.000Z","updated_at":"2025-05-09T15:16:19.000Z","dependencies_parsed_at":"2024-08-01T01:56:50.936Z","dependency_job_id":null,"html_url":"https://github.com/nivekuil/rip","commit_stats":{"total_commits":214,"total_committers":6,"mean_commits":"35.666666666666664","dds":0.04672897196261683,"last_synced_commit":"11f0b8d018975f78d922038efc7f60bf9fffafd0"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nivekuil%2Frip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nivekuil%2Frip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nivekuil%2Frip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nivekuil%2Frip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nivekuil","download_url":"https://codeload.github.com/nivekuil/rip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254209859,"owners_count":22032897,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["trash"],"created_at":"2024-07-31T23:00:45.949Z","updated_at":"2025-05-14T19:08:46.976Z","avatar_url":"https://github.com/nivekuil.png","language":"Rust","readme":"* rip (Rm ImProved)\n[[https://crates.io/crates/rm-improved][https://img.shields.io/crates/v/rm-improved.svg]]\n[[https://travis-ci.org/nivekuil/rip][https://travis-ci.org/nivekuil/rip.svg?branch=master]]\n\n=rip= is a command-line deletion tool focused on safety, ergonomics, and performance.  It favors a simple interface, and does /not/ implement the xdg-trash spec or attempt to achieve the same goals.\n\nDeleted files get sent to the graveyard (=/tmp/graveyard-$USER= by default, see [[https://github.com/nivekuil/rip#-notes][notes]] on changing this) under their absolute path, 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.\n\n=rip= is made for lazy people.  If any part of the interface could be more intuitive, please open an issue or pull request.\n\n** ⚰ Installation\n   Or get a binary [[https://github.com/nivekuil/rip/releases][release]] (Linux x86_64, ARMv7 and macOS), untar it, and move it somewhere on your $PATH:\n   #+BEGIN_EXAMPLE\n   $ tar xvzf rip-*.tar.gz\n   $ mv rip /usr/local/bin\n   #+END_EXAMPLE\n\n   or build it:\n   #+BEGIN_EXAMPLE\n   $ cargo install rm-improved\n   #+END_EXAMPLE\n\n   Arch Linux users can install it from the [[https://aur.archlinux.org/packages/rm-improved/][AUR]] (thanks @Charon77!)\n   #+BEGIN_EXAMPLE\n   $ yay -S rm-improved\n   #+END_EXAMPLE\n   \n   macOS users can install it with Homebrew:\n\n   #+BEGIN_EXAMPLE\n   $ brew install rm-improved\n   #+END_EXAMPLE\n\n** ⚰ Usage\n   #+BEGIN_EXAMPLE\n   USAGE:\n       rip [FLAGS] [OPTIONS] [TARGET]...\n\n   FLAGS:\n       -d, --decompose    Permanently deletes (unlink) the entire graveyard\n       -h, --help         Prints help information\n       -i, --inspect      Prints some info about TARGET before prompting for action\n       -s, --seance       Prints files that were sent under the current directory\n       -V, --version      Prints version information\n\n   OPTIONS:\n           --graveyard \u003cgraveyard\u003e    Directory where deleted files go to rest\n       -u, --unbury \u003ctarget\u003e       Undo the last removal by the current user, or specify some file(s) in the graveyard.  Combine with -s to restore everything printed by -s.\n\n   ARGS:\n       \u003cTARGET\u003e...    File or directory to remove\n   #+END_EXAMPLE\n   Basic usage -- easier than rm\n   #+BEGIN_EXAMPLE\n   $ rip dir1/ file1\n   #+END_EXAMPLE\n   Undo the last deletion\n   #+BEGIN_EXAMPLE\n   $ rip -u\n   Returned /tmp/graveyard-jack/home/jack/file1 to /home/jack/file1\n   #+END_EXAMPLE\n   Print some info (size and first few lines in a file, total size and first few files in a directory) about the target and then prompt for deletion\n   #+BEGIN_EXAMPLE\n   $ rip -i file1\n   dir1: file, 1337 bytes including:\n   \u003e Position: Shooting Guard and Small Forward ▪ Shoots: Right\n   \u003e 6-6, 185lb (198cm, 83kg)\n   Send file1 to the graveyard? (y/n) y\n   #+END_EXAMPLE\n   Print files that were deleted from under the current directory\n   #+BEGIN_EXAMPLE\n   $ rip -s\n   /tmp/graveyard-jack/home/jack/file1\n   /tmp/graveyard-jack/home/jack/dir1\n   #+END_EXAMPLE\n   Name conflicts are resolved\n   #+BEGIN_EXAMPLE\n   $ touch file1\n   $ rip file1\n   $ rip -s\n   /tmp/graveyard-jack/home/jack/dir1\n   /tmp/graveyard-jack/home/jack/file1\n   /tmp/graveyard-jack/home/jack/file1~1\n   #+END_EXAMPLE\n   -u also takes the path of a file in the graveyard\n   #+BEGIN_EXAMPLE\n   $ rip -u /tmp/graveyard-jack/home/jack/file1\n   Returned /tmp/graveyard-jack/home/jack/file1 to /home/jack/file1\n   #+END_EXAMPLE\n   Combine -u and -s to restore everything printed by -s\n   #+BEGIN_EXAMPLE\n   $ rip -su\n   Returned /tmp/graveyard-jack/home/jack/dir1 to /home/jack/dir1\n   Returned /tmp/graveyard-jack/home/jack/file1~1 to /home/jack/file1~1\n   #+END_EXAMPLE\n*** Emacs\n    #+begin_src emacs-lisp\n      (setq delete-by-moving-to-trash t)\n      (defun system-move-file-to-trash (filename)\n        (shell-command (concat (executable-find \"rip\") \" \" filename)))\n    #+end_src\n\n** ⚰ Notes\n   - You probably shouldn't alias =rm= to =rip=.  Unlearning muscle memory is hard, but it's harder to ensure that every =rm= you make (as different users, from different machines and application environments) is the aliased one.\n   - If you have =$XDG_DATA_HOME= environment variable set, =rip= will use =$XDG_DATA_HOME/graveyard= instead of the =/tmp/graveyard-$USER=.\n   - If you want to put the graveyard somewhere else (like =~/.local/share/Trash=), you have two options, in order of precedence:\n     1. Alias =rip= to =rip --graveyard ~/.local/share/Trash=\n     2. Set the environment variable =$GRAVEYARD= to =~/.local/share/Trash=.\n     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.\n   - In general, a deletion followed by a =--unbury= should be idempotent.\n   - The deletion log is kept in =.record=, found in the top level of the graveyard.\n","funding_links":[],"categories":["Applications","Rust","应用程序 Applications","FileSystem","\u003ca name=\"rm\"\u003e\u003c/a\u003eFile deletion and trash bin (alternatives to rm)","Other"],"sub_categories":["System tools","系统工具 System tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnivekuil%2Frip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnivekuil%2Frip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnivekuil%2Frip/lists"}