trash-cli

Move files and folders to the trash

  • Owner: sindresorhus/trash-cli
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

CLI Build Status

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

Main metrics

Overview
Name With Ownersindresorhus/trash-cli
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2015-10-13 07:06:12
Pushed At2024-07-26 12:24:18
Last Commit At
Release Count12
Last Release Namev6.0.0 (Posted on 2024-07-26 14:23:27)
First Release Namev1.0.0 (Posted on 2015-10-13 14:29:16)
用户参与
Stargazers Count1.4k
Watchers Count10
Fork Count37
Commits Count39
Has Issues Enabled
Issues Count33
Issue Open Count11
Pull Requests Count4
Pull Requests Open Count0
Pull Requests Close Count2
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private