Find Duplicates

trxsh – command-line trash manager

trxsh is a command-line trash manager for removing and restoring files without immediately deleting their contents. It moves selected files into a designated trash directory and provides commands for inspecting and maintaining the resulting collection.

The application supports restoring discarded files by identifier, allowing a specific entry to be recovered when several items are present. It can also integrate with fzf to provide an interactive restoration workflow.

trxsh includes commands for listing trash contents, calculating directory sizes and permanently deleting discarded files. Its cleanup operation supports age-based retention, allowing recently removed items to remain available while older contents are discarded.

The application implements the basic concepts of the FreeDesktop.org Trash specification. However, the developer does not claim complete conformance with every part of that specification.

This is free and open source software.

Key Features

  • Move files into a designated trash directory instead of deleting them immediately.
  • Accept file paths as command-line arguments.
  • List discarded items using –list or -l.
  • Restore a selected file by identifier using –restore or -r.
  • Use fzf for interactive file restoration.
  • Display an interactive selector through –fzf.
  • Permanently remove trash contents using –cleanup.
  • Specify a retention period using –days.
  • Keep recent files while removing older discarded items.
  • Display directory sizes using –dir-sizes.
  • Store discarded items in a structure based on the FreeDesktop.org Trash specification.
  • Provide a lightweight command interface for trash management.

Website: github.com/datsfilipe/trxsh
Support:
Developer: datsfilipe
License: MIT License

trxsh options

trxsh is written in Go. Learn Go with our recommended free books and free tutorials.

Alternatives to rm


Explore Linux

Best Free and Open Source Software - A huge collection of recommended free and open source software covering every major category.
In-depth Linux Software Reviews - Detailed assessments of Linux software covering features, usability and overall quality.

The Big List of Active Linux Distros - An extensive collection of actively developed Linux distributions.
Open Source Alternatives - Alternatives to software and services from Google, Microsoft, Apple, Adobe, IBM, Autodesk, Oracle and others.
Essential Linux System Tools - Indispensable utilities for monitoring, maintaining and managing Linux systems.
Linux Productivity Tools - Useful utilities for improving productivity and streamlining everyday tasks.
Alternatives to Popular CLI Tools - Modern alternatives to familiar command-line utilities supplied with Linux systems.
Awesome Free Linux Game Tools - Tools, utilities and companion software that improve gaming on Linux.
Machine Learning on Linux - Machine learning and deep learning software, self-hosted applications and practical tools.
Saving Money with Linux - Practical ways to reduce electricity consumption and lower computing costs with Linux.
Linux Candy - Fun, entertaining and sometimes delightfully quirky software from the lighter side of Linux.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted