Giter VIP home page Giter VIP logo

garbage-io's Introduction

Garbage-IO

Keep your garbage under control.

Rant

Too many times I use the rm command and immediately slap myself in the face for accidentally deleting something important. Surely when you go ask for help with questions like "How do I restore files I have just deleted?" the first thing people tell you is "You should have backed it up if it were important.", but that's not going to help. Next you will wonder if there is a trash bin like those you normally see outside of the terminal. This time they will tell you that "real" terminal users don't need a trash bin. Screw that! It doesn't help solve your problem, nor does it keep you from repeating the same mistake.

How does Garbage-IO help?

By replacing rm with a command that doesn't actually delete your files until some time later. Does it sound like reinventing the trash bin? Yes because it does. Here are a few things Garbage-IO does that your normal trash bin doesn't:

  • Garbage-IO can be used in a terminal (duh!).
  • Garbage-IO automatically deletes deleted items when certain conditions are met. The conditions can be the total size of the archive, or the age of the item.
  • Garbage-IO can also be used to control those directories you don't really care about, like that Downloads directory.

I want that!

Firstly remember this is very alpha, so edges are rough.

  1. Clone the project: git clone https://github.com/phunehehe/garbage-io.git
  2. Tweak the default settings: cp /path/to/garbage-io/garbage-conf $HOME/.garbage-conf. limit_size the number of disk blocks used for the archive. Change it to something like 524288, which is roughly 500MB if you have a block size of 4096. Also remove the self reference at the end.
  3. Let garbage-in replace rm: alias rm=/path/to/garbage-io/garbage-in
  4. Create a cron for garbage-out: 0 0 * * * /path/to/garbage-io/garbage-out /home/your_username/.archive

garbage-io's People

Contributors

phunehehe avatar khangpn avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

giangttd

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.