Crates.io | rmxt |
lib.rs | rmxt |
version | 0.1.13 |
created_at | 2025-08-25 21:18:53.773415+00 |
updated_at | 2025-09-18 17:37:04.537566+00 |
description | A replacement for the 'rm' command with a trash feature for safer file deletion. |
homepage | https://github.com/santoshxshrestha/rmxt |
repository | https://github.com/santoshxshrestha/rmxt |
max_upload_size | |
id | 1810172 |
size | 72,442 |
A safer, recoverable alternative to the traditional rm
command that moves files to the system trash instead of permanently deleting them.
rm
commandFor comprehensive guides and detailed examples, see our modular documentation:
The fastest way to install rmxt:
curl -fsSL https://raw.githubusercontent.com/santoshxshrestha/rmxt/main/scripts/install.sh | bash
cargo install rmxt
If you use Nix, you can run or build rmxt
without installing Rust:
nix run github:santoshxshrestha/rmxt
Or build the binary:
nix build github:santoshxshrestha/rmxt
See the Installation Guide for full details and prerequisites.
For detailed installation instructions including platform-specific setup, see the Installation Guide.
# Remove files safely (move to trash)
rmxt file.txt directory/
# List files in trash
rmxt list
# Recover files from trash
rmxt recover file.txt
rmxt recover-all
# Clean old files from trash
rmxt tidy
For comprehensive usage examples, workflows, and advanced operations, see the Usage Guide.
Replace rm
with rmxt
for safer file operations:
# Add to ~/.bashrc or ~/.zshrc
alias rm='rmxt'
For complete shell integration including advanced configurations, tab completion, and cross-shell compatibility, see the Advanced Features Guide.
Flag | Long Form | Description |
---|---|---|
-p |
--permanent |
Permanently delete without using trash |
-r |
--recursive |
Remove directories and contents recursively |
-f |
--force |
Force removal without prompts |
-d |
--dir |
Remove empty directories |
-t |
--time |
Specify days for recovery or tidy commands |
Command | Description |
---|---|
list [-t days] |
Show files in trash with optional time filter |
recover <name> |
Restore specific file from trash |
recover-all |
Restore all files from trash |
purge <name> |
Permanently delete specific file from trash |
tidy [-t days] |
Remove old files from trash (default: 30 days) |
⚠️ Warning: The
-p, --permanent
flag permanently deletes files without moving them to trash. Use with caution!
For power users and complex workflows:
Having issues? Check the Advanced Features Guide for solutions to common problems:
rmxt integrates with native system trash implementations across platforms:
~/.local/share/Trash/files/
(XDG specification)~/.Trash/
(Finder integration)The exact location is managed by the system's trash implementation, ensuring compatibility with your desktop environment.
We welcome contributions! Here's how you can help:
# Clone the repository
git clone https://github.com/santoshxshrestha/rmxt
cd rmxt
# Build and test
cargo build
cargo test
# Install locally for testing
cargo install --path .
For technical details and advanced development topics, see the documentation guides.
This project is licensed under the MIT License.