Silence of Linux (after rm -rf /* )
To be fair, rm -rf /* was taking way too long with several millions of files in deep hierarchy. So I ran Delete (Java based recursive File & Directory Delete Tool).
Finally all data that could be deleted was deleted. I could’ve run shred, I could’ve run dd on the drive itself ( dd if=/dev/urandom of=/dev/sda
), I chose the simpler path.
-bash-3.2# clear
-bash: /usr/bin/clear: No such file or directory
-bash-3.2# ls
-bash: /bin/ls: No such file or directory
-bash-3.2# echo *
boot dev media misc net proc sys var
-bash-3.2# echo boot/*
boot/*
-bash-3.2# echo dev/*
dev/initctl dev/pts dev/shm
-bash-3.2# echo misc/*
misc/*
-bash-3.2# echo net/*
net/*
-bash-3.2# echo net/*
net/*
Only one thing left to do:
-bash-3.2# reboot
-bash: reboot: command not found
I still have the final weapon:
-bash-3.2# echo 1 > /proc/sys/kernel/sysrq
-bash-3.2# echo b > /proc/sysrq-trigger
This is pretty much the same as pressing the reset button on the server (if equipped). No daemons will be shut down gracefully, no filesystem sync will occur, and you may get the wrath of a fsck (or worse, a non-booting server) upon reboot. But what do I care?
R.I.P.
Categories
One reply on “Mini-Story: Deathly Silence of Linux (after rm -rf /*)”
[…] Mini-Story: Deathly Silence of Linux (after rm -rf /*) […]