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!

(Linux/UNIX source code).

2010-04-15

Contributing your list of protected paths to safe-rm

This is an open invitation to all safe-rm users to send in their personal lists of protected paths so that some of these can hopefully be included in a future release.

safe-rm is all about preventing little disasters and part of this involves shipping a default set of paths to protect from deletion. I've tried to guess what would be useful to people, but it's very likely that I have a missed a number of critical paths that people care about.

So if you're happy with sharing your configuration, please consider emailing your /etc/safe-rm.conf or ~/.safe-rm to francois@safe-rm.org.nz.

1 comment:

Anonymous said...

Additional entries to my global safe-rm.conf:

/home/*

/home/*/Documents

/home/*/Mail

/home/*/Desktop

/home/*/Pictures

/home/*/.local

/home/*/.config

/home/*/.mozilla

/home/*/.gnupg

Creative Commons License
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 New Zealand License.