rm-trash
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.
Metadata
Release files for rm-trash 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rm_trash-1.0.2.tar.gz | 6.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rm_trash-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.4 kB
Release files / rm_trash-1.0.2.tar.gz
| Download URL | rm_trash-1.0.2.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8cc2454e4cf5056178c3d8883723798f27c05f0d120419cbc9f32d32a48e658f
|
|
BLAKE2b-256 checksum How to use checksums |
1f346125d839c75b0736d3eacbefec285c0b983cd3f82c20455f66be390ff25f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.11.0 Linux/5.15.0-1024-azure
|
Release files / rm_trash-1.0.2-py3-none-any.whl
| Download URL | rm_trash-1.0.2-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29164737b6a40e9a45616d1457e3696dec1d3de943e064beac2b0fb94ee12c5e
|
|
BLAKE2b-256 checksum How to use checksums |
9664fdf98486effae2aff997001bfc4bc54b569f7b9147a77d2a4ffc716fafd5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.1 CPython/3.11.0 Linux/5.15.0-1024-azure
|