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 won’t actually work for many years without --no-preserve-root option. |
You didn't try the command before posting it, did you? On modern linuxes (with Gnu-rm) "rm" won't delete root ("/"). But there is a workaround...
ReplyDeleteI actually did and I was luck. I didn't read it but copied, pasted, and ran it directly. Then I read it carefully, I was luck. Later, I learned from that post (it's gone now, might be deleted?) on Arch Linux Forums, Debian or Ubuntu community (I couldn't recall which one was) has patched rm (in upstream) command for new preserve root options (the workaround you mentioned).
ReplyDelete