safe-rm - saves you from rm -rf /*

Okay, so it’s a sysadmin’s nightmare that you might when tired miss out a dot from an rm -rf ./* and whilst you shouldn’t run as root, there are times when permissions problems push you into it.

This little gem allows you to blacklist folders from rm (such as /etc /bin and other system directories, along with any custom ones you might want to protect).

It’s in debian/ubuntu repositories so apt-get install safe-rm is quite useful, but it seems to be nowhere to be found for CentOS/RHEL, so we packaged it up (one of our employees used to be a package maintainer for a linux distro) for CentOS servers.

The original url for safe-rm is https://launchpad.net/safe-rm and our rpm is available here - Feel free to mirror this elsewhere.

Next up: how we created the rpm


Tags: ubuntulinuxrootbackupcentosrpmdebian