Giter Site home page Giter Site logo

srm's Introduction

Safe Remove (rm) command with cache/undo

This is a rm command imitation, but without actually removing anything, only moving it into cache (~/.cache/srm). By doing this, you can recover accidentally-removed files.

Install

Please see the release page for the compiled binary and the latest pre-release downloads.

If you have go installed, then you can run:

go install github.com/WestleyR/srm@latest

Or via clone:

git clone https://github.com/WestleyR/srm
cd srm/
make
sudo make install # Or
without root: 'make install PREFIX=${HOME}/.local'

Aliasing

Optional to add this to your ~/.bashrc or ~/.bash_profile:

alias rm="srm"

Linking

Instead or addition to aliasing, you can symlink srm -> rm in a first-search path directory.

$ echo $PATH
/usr/local/sbin:/usr/local/bin ...

# ln -s /usr/local/bin/srm /usr/local/sbin/rm

This way, rm will always run srm, even for other users. You can always run the normal rm by calling /bin/rm ....

Configuring

TODO.

License

This project is licensed under the terms of The Clear BSD License. See the LICENSE file for more details.

srm's People

Contributors

juliyvchirkov avatar westleyk avatar westleyr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

srm's Issues

go install fails

The easiest way to install with go install github.com/WestleyR/srm@latest, recommended in readme, fails for some reason

go version go1.20.5 linux/amd64, Ubuntu server 22.04, if that matters somehow

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.