Move files and folders to the trash
Switch branches/tags
Clone or download
Latest commit 2bb419f Oct 13, 2018
Permalink
Failed to load latest commit information.
.editorconfig Require Node.js 8 Oct 13, 2018
.gitattributes Require Node.js 8 Oct 13, 2018
.gitignore Require Node.js 8 Oct 13, 2018
.npmrc Require Node.js 8 Oct 13, 2018
.travis.yml Require Node.js 8 Oct 13, 2018
cli.js ignore rm flags Dec 29, 2015
license Require Node.js 8 Oct 13, 2018
package.json Require Node.js 8 Oct 13, 2018
readme.md Replace RawGit URL in the readme Oct 13, 2018
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