Documentation

Trasher – recoverable file deletion utility

Trasher is a command-line utility that moves files and directories into a designated trash directory rather than deleting them immediately. It offers an alternative to rm for users who want the option of recovering accidentally removed data.

The application uses a trash directory associated with the current filesystem. Moving a file within the same filesystem generally requires a rename rather than copying its contents, which can make removing large directory trees considerably faster than recursively deleting them.

Trasher identifies discarded items using their original names together with encoded deletion timestamps. This allows several files with identical names to coexist in the trash without overwriting one another.

The tool can list discarded items, restore selected entries and permanently remove files that are no longer needed. Unlike the usual desktop trash workflow, its unrm command restores an item to the current directory unless another destination is specified.

This is free and open source software.

Key Features

  • Move files and directories into trash directories using the rm subcommand.
  • Restore discarded items using unrm.
  • Specify a different restoration destination using –to.
  • List discarded items using the ls subcommand.
  • Display additional details, including item size and contents.
  • Assign identifiers derived from deletion timestamps.
  • Preserve multiple trashed items with identical names.
  • Select a particular item for restoration using its identifier.
  • Support optional fuzzy searching during restoration.
  • Retrieve the filesystem path of a trashed item using path-of.
  • Identify the current filesystem’s trash directory using trash-path.
  • Delete selected trash items permanently using drop.
  • Empty an entire trash directory using empty.
  • Bypass the trash and delete an item permanently using –permanently.
  • Handle filenames containing invalid UTF-8 through an explicit conversion option.

Website: github.com/clementnerma/trasher
Support:
Developer: Clément Nerma
License: Apache License 2.0

trasher help

trasher is written in Rust. Learn Rust 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