Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

trash-cli

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trash-cli

Move files and folders to the trash

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
34K
increased by61.03%
Maintainers
1
Weekly downloads
 
Created
Source

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> [...]

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

Tip

Add alias t=trash to your .zshrc/.bashrc to reduce typing: $ t unicorn.png.

FAQ

License

MIT © Sindre Sorhus

Keywords

FAQs

Package last updated on 04 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc