Posts Tagged nz

Safe rm – stops you accidentally wipeing the system!

Posted by on Monday, 21 September, 2009

I found this the today , and having had the odd accident im most definitely going to be installing this on my own server!

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.

So, why not install this on your server and save yourself some hassles in case you accidentally have that shell script gone wrong problem. Now if somebody could do the same to fdisk I would be totally happy, there was this time when i accidentally repartitioned my own server HDD after puting a new one in, and got the wrong drive :/

For manual install its as simple as

wget the file

tar zvxf safe-rm-0.6.tar.gz

cd safe-rm-0.6

mv /bin/rm /bin/old-rm

mv safe-rm /bin/rm

For those running debian variants you can

apt-get install safe-rm

Points to note in the README:

Once you have installed safe-rm on your system (see INSTALL), you will need to
fill the system-wide or user-specific blacklists with the paths that you’d like
to protect against accidental deletion.

The system-wide blacklist lives in /etc/safe-rm.conf and you should probably add
paths like these:


The user-specific blacklist lives in ~/.safe-rm and could include things like:


Here are two projects which allow you to recover recently deleted files by trapping
all unlink(), rename() and open() system calls through the LD_PRELOAD facility:

delsafe (link in the readme is dead but i googled and updated it here)


There are also projects which implement the trashcan spec. For example:


Website migration from

Posted by on Tuesday, 7 April, 2009

I’ve been wanting to move the old onto a more generic name since its more than just debian. Its about Linux.

Ive also made the move for the first time into using somebody elses software for the site rather than my own home rolled stuff, as i really just dont have the time anymore.

Greets go out to those who helped with migrating posts (you can see who they are by who posted em!).

As for more news. The debian and ubnutu repository is going, and the server is now moved offshore. Orcon refused to respond when asked for more bandwidth and 128k international wasnt enough to maintain it. Also gone is the FTP with ISO images, for the same reason.

I have no hard feelings however, I now host on a rimuhosting VPS which has excellent resources, and saves me the hassle of having to deal with hardware and upgrades (PS, I work as a sysadmin at Rimu – and its the most awesome place to work.)

My goal now is to turn the website into more of a community hub for NZ Linux people both new and old, and geeks in general. I welcome you all to post news, gadgets, your own projects, or even how you managed to install Linux on the toaster.

When you post, just post as a Draft, ill review and approve. If I notice anyone who seems particularly into it, i will happily make you an admin who can approve or help manage the website.