Imported from the Apple Support Forums via the Wayback Machine 🔗
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?
Imported from the Apple Support Forums via the Wayback Machine 🔗
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.
0
Paul Rest·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Bad bad command... yeah, sounds like it. Well, if I ever need to REALLY get back at someone who uses OS X and they don't know Unix, I'll know what to tell them to do. Thanks for the info, good to know.