-( rum )- To avoid the madness of rm mistakes -= Scenario 1: # rm -rf / Oops! I didn't mean to... DAMN! I got distracted. I lost all! -= Scenario 2: # mkdir /eternal # rm -rf /et # ls: /etc: No such file or directory Nooooooooo! -= Scenario 3: $ rm -r ~/ SUGAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa Well you got it, right? The rum patch gives you a hand. With this patch, rm will look at /etc/rm.conf and ~/.rm.conf, it will load a list of protected files and directories, and it will not delete them. To force the deletion of a protected entry you must use the -ff option (ex: rm -rff /etc). You can cp the rm.conf you find here to /etc, read it to know the syntax. Install rum in this way; Get the coreutils: $ wget http://ftp.gnu.org/pub/gnu/coreutils/coreutils-5.2.1.tar.bz2 $ tar xfj coreutils-5.2.1.tar.bz2 Get the patch $ wget http://freaknet.org/alpt/src/utils/rum/files/rum-5.2.1.patch $ wget http://freaknet.org/alpt/src/utils/rum/files/rm.conf $ cp rum-5.2.1.patch coreutils-5.2.1/ $ cd coreutils-5.2.1/ $ patch -p1 < rum-5.2.1.patch $ configure && make $ su Copy it # cp ../rm.conf /etc # cd src/ # cp /bin/rm /bin/rm.bkp # cp rm /bin/ # rm /usr/bin/rm # ln -s /bin/rm /usr/bin/rm # echo "Now testing..." # /bin/rm -r /bin # echo "Enjoy." Ehi dude, all this code is under GPL-2, and yes, I'm not responsabile of the damages that this code can cause to you. Andrea Lo Pumo aka AlpT (@freaknet.org)