LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Linux gurus - need an explanation for the following shell commands sequence (https://www.linuxquestions.org/questions/linux-general-1/linux-gurus-need-an-explanation-for-the-following-shell-commands-sequence-620212/)

neo77777 02-10-2008 09:43 PM

Linux gurus - need an explanation for the following shell commands sequence
 
:(){ :|:&};:


DO NOT TRY IT ON A PRODUCTION BOX!
Can anyone explain what the above sequence performs?

peart 02-10-2008 09:48 PM

It's a fork bomb - oldest trick in the book. It defines a function which calls itself over and over again til the comp dies an ugly death...

http://en.wikipedia.org/wiki/Fork_bomb

H_TeXMeX_H 02-11-2008 02:47 AM

That'll teach you to type random stuff in the terminal, maybe you'll type this by accident. The wiki says the cure for it is:

Code:

while (sleep 100 &!) do; done
That's for z-shell, I suppose it must be translated for bash.


All times are GMT -5. The time now is 04:29 PM.