FreeDesktop-compliant trasher for Unix

Overview

to-trash 🚮

to-trash (tt for short) is a fast, small, and hopefully FreeDesktop-compliant file trasher for Linux.

Compliance

tt aims to have compliance with the FreeDesktop.org Trash specification.

Checked items below are what tt considers to be implemented, unchecked is anything that has no or partial implementation.

Some of those are my interpretation of the spec. and not necessarily verbatim to the specification text.

  • Considers that the "home trash" is located at $XDG_DATA_HOME/Trash.
    • If XDG_DATA_HOME is not defined, falls back to ~/.local/share/Trash.
  • Files that the user trashes from the same mount point as home are stored in the home trash.
  • Trashed files are sent to $trash/files.
  • An info file is created for every file being trashed.
    • Contains a Path key with the absolute pathname of the original location of the file/directory
    • Contains a DeletionDate key with the date and time when the file/directory was trashed in the YYYY-MM-DDThh:mm:ss format and in the user's local timezone.
  • Create or update the $trash/directorysizes file, which is a cache of the sizes of the directories that were trashed into this trash directory.
    • Each entry contains the name and size of the trashed directory, as well as the modification time of the corresponding trashinfo file
    • The size is calculated as the disk space used by the directory and its contents in bytes.
    • The directory name in the directorysizes must be percent-encoded.
  • If a $topdir/.Trash does not exist or has not passed the checks:
    • If a $topdir/.Trash-$uid directory does not exist, the implementation must immediately create it, without any warnings or delays for the user.

Feel free to open an issue if you feel like tt is lacking any important features.

You might also like...
Just a UNIX's cat copy, but less bloated and in Rust.
Just a UNIX's cat copy, but less bloated and in Rust.

RAT The opposite of UNIX's cat, less bloated, and in Rust. About the project The idea of this CLI is "A CLI program that is basically UNIX's cat comma

skyWM is an extensible tiling window manager written in Rust. skyWM has a clear and distinct focus adhering to the KISS and Unix philosophy.
skyWM is an extensible tiling window manager written in Rust. skyWM has a clear and distinct focus adhering to the KISS and Unix philosophy.

Please note: skyWM is currently in heavy development and is not usable as of yet. Documentation and versions will change quickly. skyWM skyWM is an ex

Safe Unix shell-like parameter expansion/variable substitution via cross-platform CLI or Rust API
Safe Unix shell-like parameter expansion/variable substitution via cross-platform CLI or Rust API

Safe Unix shell-like parameter expansion/variable substitution for those who need a more powerful alternative to envsubst but don't want to resort to

A unix shell written in rust
A unix shell written in rust

rust-shell a unix shell written in rust Features Main features has .rc file (in ~/.rstshrc) has syntax highlighting fish-like autosuggestion emacs edi

Superviseur - A simple process supervisor for UNIX-like systems
Superviseur - A simple process supervisor for UNIX-like systems

A simple process supervisor for UNIX-like systems. Currently supports non-containerized services. Containerized services and wasm services will be supported in the future.

Convert a unix timestamp (seconds) to a struct {year, month, day, hour, minute, second, weekday}.

uts2ts uts2ts is a simple function that does only one thing: It converts a unix timestamp to something slightly more useful. ;-) So why then? Well, it

Library for Unix users and groups in Rust.

uzers-rs Adoption and continuation of the unmaintained ogham/rust-users crate. Big shout-out to its creator Benjamin Sago. This is a library for acces

A lightweight terminal tool to manage processes in Unix machines.

TTV v0.0.1 TTV (term-task-viewer) is a lightweight tool to view and manage active processes in Unix machines. It provides an easy interface with vim-l

Library for Unix users and groups in Rust.

uzers-rs Adoption and continuation of the unmaintained ogham/rust-users crate. Big shout-out to its creator Benjamin Sago. This is a library for acces

Owner
Vinícius Miguel
barely passed the Turing test
Vinícius Miguel
CLI for ERC-5564 compliant stealth address management on evm chains

stealthereum-cli This is a bare bones CLI written in rust for ERC-5564 compliant stealth address management on evm chains It's currently the easiest w

κασσάνδρα.eth 6 Oct 11, 2023
A Rust curses library, supports Unix platforms and Windows

pancurses pancurses is a curses library for Rust that supports both Linux and Windows by abstracting away the backend that it uses (ncurses-rs and pdc

Ilkka Halila 360 Jan 7, 2023
Reviving the Research Edition Unix speak command

This repository contains the source code of Unix speak program that appeared in the Third (1973) to Sixth (1975) Research Unix editions, slightly adjusted to run on a modern computer. Details on the code's provenance and the methods employed for reviving it can be found in this blog post.

Diomidis Spinellis 31 Jul 27, 2022
Spawn multiple concurrent unix terminals in Discord

Using this bot can be exceedingly dangerous since you're basically granting people direct access to your shell.

Simon Larsson 11 Jun 1, 2021
fcp is a significantly faster alternative to the classic Unix cp(1) command

A significantly faster alternative to the classic Unix cp(1) command, copying large files and directories in a fraction of the time.

Kevin Svetlitski 532 Jan 3, 2023
A tool for automating terminal applications in Unix.

expectrl A tool for automating terminal applications in Unix. Using the library you can: Spawn process Control process Expect/Verify responces It was

Maxim Zhiburt 132 Dec 14, 2022
A small unix and windows lib to search for executables in PATH folders.

A small unix and windows lib to search for executables in path folders.

Robiot 2 Dec 25, 2021
Modern file system navigation tool on Unix

monat -- Modern file system Navigator 简体中文 Introduction monat is a Unix shell auxiliary command focusing on the navigation of the file system, especia

Pavinberg 8 May 10, 2022
A Unix shell written and implemented in rust 🦀

vsh A Blazingly fast shell made in Rust ?? Installation Copy and paste the following command and choose the appropriate installtion method for you. Yo

XMantle 89 Dec 18, 2022
xcp is a (partial) clone of the Unix cp command. It is not intended as a full replacement

xcp is a (partial) clone of the Unix cp command. It is not intended as a full replacement, but as a companion utility with some more user-friendly feedback and some optimisations that make sense under certain tasks (see below).

Steve Smith 310 Jan 5, 2023