文章列表: 1 篇
2025-10-23
2025-10-23 ~ 2025-10-23
📘 Overview
On Linux, the command-line tool trash-cli provides a safe alternative to rm, allowing you to move files to the Trash instead of permanently deleting them.
It fully complies with the FreeDesktop Trash Specification, which is used by desktop environments such as GNOME and KDE.
🧰 Installation
You can install trash-cli using your package manager or Python’s pip:
| |
🚫 Disable rm (for safety)
To avoid accidental permanent deletions, you can override the rm command and display a friendly warning instead.