Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Question:

Question: "Russian Roulette" Bash Command in Terminal?

Came across that Unix bash command that plays Russian Roulette with your system. There are several variants, but the one I happened upon is as follows: [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo \"You live\"

I know very little about Unix (can basically move around among folders in the Terminal, delete files, simple stuff like that), so I'm wondering what, if anything, this does to one's system if you run it in 10.4's Terminal and "lose." Apparently it really does some damage serious if you're running Linux, but since OS X is very different from both Unix and Linux, I'm quite curious to know what kind of damage it would do. Anyone know?

Posted on Oct 31, 2005 5:12 PM

Reply

Oct 31, 2005 5:39 PM in response to Paul Rest In response to Paul Rest

If you lose, it would execute this command:
rm -rf /


What does that command do? remove (rm), recursively (-r), all items starting at the root(/), without warning you at all (-f)

This is a very bad command to run. Only slightly less-worse than this command:
sudo rm -rf /


DO NOT RUN THESE COMMANDS!!!

What kind of damage would the first one do? At the very least, it would delete your home directory and everything it contains.

Oct 31, 2005 5:39 PM

Reply Helpful
User profile for user: Paul Rest

Question: "Russian Roulette" Bash Command in Terminal?