1. trash-cli
Move files and folders to the trash
trash-cli
Package: trash-cli
Created by: sindresorhus
Last modified: Sat, 21 Oct 2023 01:40:46 GMT
Version: 5.0.0
License: MIT
Downloads: 63,184
Repository: https://github.com/sindresorhus/trash-cli

Install

npm install trash-cli
yarn add trash-cli

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

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin