Trxsh is a simple and efficient command-line trash manager written in Go. It allows you to safely delete, list, restore, and permanently remove files from your system's trash directory.
- Arch:
The package is now in AUR, so to install it you can use an AUR helper like yay:
yay -Syu trxshor go through the process manually:
sudo pacman -S --needed git base-devel
git clone https://aur.archlinux.org/trxsh.git
cd yay
makepkg -si- NixOS:
For now you can add a custom derivation to your NixOS config. Please refer to derivation example.
- deletion: move files to a designated trash directory instead of permanently deleting them.
- list: biew all files currently in the trash.
- restore: recover files from the trash by ID or using an interactive fzf interface.
- cleanup: permanently delete files in the trash (use --days N to keep recent files).
Usage: trxsh [OPTIONS] [FILES]
Options:
--fzf, -f : Restore files using fzf
--list, -l : List files in trash
--restore, -r ID : Restore file by ID
--cleanup, -c : Empty trash (use --days N to keep recent files)
--dir-sizes, -s : Show directory sizes
--help, -h : Show this helpI've tried implementing the basics from freedesktop.org trash specification, but I haven't checked if eveything meets the spec. If you feel like this is an important matter, please feel free to address any issue you find with a proper PR, or to point out and I can work on that whenever I have some spare time.
This project is licensed under the MIT License.