Play Russian Roulette by Rihanna, then Run with this Bash script1 as root:
[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live"
Warning: It may DELETE everything from your root filesystem, play this game with care!!!3
You will have a chance to die with honor!
via Arch Linux Forums2
[1] | The $[] syntax is deprecated. |
[2] | http://bbs.archlinux.org/viewtopic.php?pid=713975 is gone. |
[3] | It wont actually work for many years without --no-preserve-root option. |
You didnt try the command before posting it, did you? On modern linuxes (with Gnu-rm) "rm" wont delete root ("/"). But there is a workaround...
ReplyDeleteI actually did and I was luck. I didnt read it but copied, pasted, and ran it directly. Then I read it carefully, I was luck. Later, I learned from that post (its gone now, might be deleted?) on Arch Linux Forums, Debian or Ubuntu community (I couldnt recall which one was) has patched rm (in upstream) command for new preserve root options (the workaround you mentioned).
ReplyDelete