Socket
Socket
Sign inDemoInstall

trash-cli

Package Overview
Dependencies
113
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    trash-cli

Move files and folders to the trash


Version published
Weekly downloads
11K
increased by1.02%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

trash-cliCLI

Move files and folders to the trash

Works on macOS (10.12+), Linux, and Windows (8+).

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.

Accepts paths and glob patterns.

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

Keywords

FAQs

Last updated on 21 Nov 2021

Did you know?

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc