Move files and folders to the trash
JavaScript
Latest commit 34f7d2f Sep 23, 2016 @sindresorhus 1.4.0
Permalink
Failed to load latest commit information.
.editorconfig bump update-notifier Apr 8, 2016
.gitattributes init Oct 13, 2015
.gitignore init Oct 13, 2015
.travis.yml bump dependencies Sep 23, 2016
cli.js ignore rm flags Dec 29, 2015
license init Oct 13, 2015
package.json 1.4.0 Sep 23, 2016
readme.md OS X → macOS Jun 14, 2016
test.js ignore rm flags Dec 29, 2015

readme.md

trash-cliCLI Build Status

Move files and folders to the trash

Works on macOS, Linux, and Windows.

In contrast to rm which is dangerous and permanently delete files, this only moves them to the trash, which is much safer and reversible. I would also recommend reading my guide on safeguarding rm.

Install

$ npm install --global trash-cli

Usage

$ trash --help

  Usage
    $ trash <path|glob> [...]

  Examples
    $ trash unicorn.png rainbow.png
    $ trash '*.png' '!unicorn.png'

Tip

Add alias rm=trash to your .zshrc/.bashrc to reduce typing & safely trash files: $ rm unicorn.png.

FAQ

Related

License

MIT © Sindre Sorhus