Coder Social home page Coder Social logo

rm-trash's Introduction

rm-trash

GitHub release (latest SemVer)

rm-trash is a macOS command-line utility that moves files and directories to the Trash. Unlike similar tools, rm-trash intends to be a complete alternative to rm and rmdir, to the extent that you could use aliases to have rm-trash replace them both.

rm-trash works by communicating with Finder through AppleScript, so it's no different from moving files to the Trash from within Finder itself.

Installation

Install rm-trash with Homebrew via the Houkago Tea Tap.

brew tap celsiusnarhwal/htt
brew install rm-trash

Usage

Invoke rm-trash with the trash command, which will become available after installation.

trash --help

will tell you everything you need to know.

Replacing rm and rmdir

If you wish, you can replace rm and rmdir with aliases to trash.

alias rm="trash trash"
alias rmdir="trash dir"

trash supports all options of both commands. Run trash --help for details.

Limitations

rm-trash refuses to as root when System Integrity Protection (SIP) is disabled. You can still run rm-trash as a non-root user when SIP is disabled, or as any user when SIP is enabled. This limitation is intended to prevent you from accidentally trashing files and directories that are typically protected by SIP.

If you must remove files as root while SIP is disabled, you can always fall back to rm.

License

rm-trash is licensed under the MIT License.

rm-trash's People

Contributors

celsiusnarhwal avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.