Coder Social home page Coder Social logo

rubbish's Introduction

rubbish

A command line tool written in Rust to interface with the OS's trash-can.

Supported platforms:

Warning: rubbish is currently beta level and no guarantees are made about its integrity of managing your files. Additionally, it currently does not properly handle trashing files if the files are on a different filesystem/partition than the home folder.

The following subcommands are provided:

Subcommand Description
empty Empty the trash
erase Erase the specified files (i.e. rm)
list Recursively list previously trashed files from a specified directory
prune Delete files from the trash that match a specified regex
put Trash the specified files
restore Restore a previously trashed file to its original location

Installation

Package managers

Packaging status

Prebuilt binaries:

Prebuilt binaries are provided in the releases tab.

From source:

cargo install --git https://github.com/cjbassi/rubbish

Automatically emptying the trash

Various timers can be setup to automatically empty the trash of files that are older than a specified age. This helps reduce the amount of files in the trash-can and the amount of disk space it uses.

systemd

For systemd based Linux distros, a systemd timer file is located here along with the service file here.

To setup the systemd timer:

  1. Copy both files to ~/.config/systemd/user/
  2. Customize how often the timer runs (defaults to daily) and how old the files need to be to be deleted (defaults to 30 days)
  3. Run systemctl --user daemon-reload
  4. Run systemctl --user enable --now trash-empty.timer

Related projects

rubbish's People

Contributors

cjbassi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.