Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/proprietary/macos-trash
CLI utility to send files to macOS Finder trash can (macOS Sonoma 14.5)
https://github.com/proprietary/macos-trash
command-line command-line-interface command-line-tool macos macosx objective-c trash trashcan
Last synced: about 16 hours ago
JSON representation
CLI utility to send files to macOS Finder trash can (macOS Sonoma 14.5)
- Host: GitHub
- URL: https://github.com/proprietary/macos-trash
- Owner: proprietary
- License: apache-2.0
- Created: 2024-06-04T00:57:47.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-06-04T02:31:05.000Z (4 months ago)
- Last Synced: 2024-06-05T02:58:04.583Z (4 months ago)
- Topics: command-line, command-line-interface, command-line-tool, macos, macosx, objective-c, trash, trashcan
- Language: Objective-C
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
``trash`` for macOS
~~~~~~~~~~~~~~~~~~~~This is a simple utility to send files to macOS's Trash from the command line.
This works on macOS Sonoma 14.5 (June 2024).
Download and install binary release
---------------------------------------.. code-block:: bash
curl -fSLO https://github.com/proprietary/macos-trash/releases/download/v1.0.0/trash
sudo install ./trash /usr/local/binUsage
-------.. code-block:: bash
cd /tmp
echo "hello world" > hello-world.txt
trash hello-world.txtThis works on directories or regular files. I suggest using
``trash`` anywhere you would have used ``rm(1)``.Currently, this command line tool cannot restore files. You will have
to open Trash in Finder and restore it from the GUI.Building manually
-------------------Build
=====.. code-block:: bash
xcode-select --install
git clone https://github.com/proprietary/macos-trash
cd macos-trash
make
make test
sudo make installVerify installation
===================.. code-block:: bash
trash --version
License
--------Apache-2.0