The new release of safe-rm, version 0.6, fixes a bug which caused symbolic links to protected files to be undeletable. Therefore if you create a symlink to /usr/lib, you will now be able to delete it without having to use the real rm explicitly.
You can still use safe-rm to protect regular files and directories from accidental deletion using the rm command, but symbolic links will no longer be protected.
Another minor enhancement included in this release is the change in the message displayed by safe-rm when a protected file is skipped. The new message should now make it explicit who is to blame when a file isn't being deleted.
What is safe-rm?
Safe-rm is a safety tool intended to prevent the accidental deletion of important files by replacing /bin/rm with a wrapper, which checks the given arguments against a configurable blacklist of files and directories that should never be removed.
Users who attempt to delete one of these protected files or directories will not be able to do so and will be shown a warning message instead:
$ rm -rf /usr Skipping /usr
(Protected paths can be set both at the site and user levels.)
Recovering important files you deleted by mistake can be quite hard. Protect yourself today by installing safe-rm and reduce the likelihood that you will need to contact a data recovery service!
from Google Code (Linux/UNIX source code).2009-05-22
2009-04-02
Wildcards in safe-rm 0.5
In addition to protecting specific files and directories from accidental deletion, this release of safe-rm introduces support for wildcards in protected paths.
Minor improvements were also made to the documentation and overall code quality.
Many thanks to Dave Jones for his help in getting this release in shape.
Minor improvements were also made to the documentation and overall code quality.
Many thanks to Dave Jones for his help in getting this release in shape.
Labels:
release
2008-11-01
safe-rm 0.4 adds protection for the root directory
A new release of safe-rm is now available from the usual place.
The main change in this release is a fix for a bug that was preventing the root directory (/) from being added to the list of protected paths. Safe-rm is now able to protect you from the infamous rm -rf /.
I highly recommend that you now add / to your /etc/safe-rm.conf.
Thanks to Mubeen Jukaku for reporting this problem!
The main change in this release is a fix for a bug that was preventing the root directory (/) from being added to the list of protected paths. Safe-rm is now able to protect you from the infamous rm -rf /.
I highly recommend that you now add / to your /etc/safe-rm.conf.
Thanks to Mubeen Jukaku for reporting this problem!
Labels:
release
2008-09-08
safe-rm 0.3 now available
This new safe-rm release fixes a rather important bug: safe-rm would miss files in the current directory while checking the arguments against the blacklist.
You should upgrade as soon as possible to make sure that the full protection is enabled.
Thanks to Yi-Feng Tzeng for letting me know about this problem!
You should upgrade as soon as possible to make sure that the full protection is enabled.
Thanks to Yi-Feng Tzeng for letting me know about this problem!
Labels:
release
2008-06-09
safe-rm 0.2 released
After going through the feedback I received about safe-rm 0.1, I decided to cut a new release with a number of enhancements and bug fixes including:
- support for system-wide protected path list
- support for user-specific protected path list
- fix for infinite loops before using the "real" rm
2008-06-08
safe-rm 0.1 released
As mentioned on the debian-devel mailing list, I recently deleted my /usr/lib by mistake and had to go through the pain of reinstalling all of my Debian packages. So I wrote a little Perl script which I have now aliased to "rm" in my .bashrc.
Basically, the wrapper has a blacklist which contains directories like /usr/lib, /home, /etc and removes those before passing its arguments to the real 'rm' command.
I'm probably not the only person to have made this mistake and who wants to avoid doing it again. So I'm thinking of turning it into something that's useful to other people (probably packaging it in some form).
I realize that 'rm' is a low-level command which should do what it's told, but the reality is that a lot of people use it directly on a daily basis and can accidently hose their system. I don't want to implement a "command-line trashcan", but I'm looking for a way to prevent me from doing things I should never ask for (like 'rm -rf /usr/lib/').
Basically, the wrapper has a blacklist which contains directories like /usr/lib, /home, /etc and removes those before passing its arguments to the real 'rm' command.
I'm probably not the only person to have made this mistake and who wants to avoid doing it again. So I'm thinking of turning it into something that's useful to other people (probably packaging it in some form).
I realize that 'rm' is a low-level command which should do what it's told, but the reality is that a lot of people use it directly on a daily basis and can accidently hose their system. I don't want to implement a "command-line trashcan", but I'm looking for a way to prevent me from doing things I should never ask for (like 'rm -rf /usr/lib/').
Subscribe to:
Posts (Atom)

