srm

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2023 License: BSD-3-Clause-Clear Imports: 1 Imported by: 0

README

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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
foo
srm
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL