Skip to content

vadimdemedes/trash-cli

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

trash-cliCLI Build Status

Move files and folders to the trash

Works on OS X, 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. You should not alias rm to trash however as that would break most scripts relying on rm behavior. Rather use trash from the CLI and in your own scripts. 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 t=trash to your .zshrc/.bashrc to reduce typing: $ t unicorn.png.

Related

License

MIT © Sindre Sorhus

About

Move files and folders to the trash

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%