0

An assignment for a class is to describe in one or two sentences what this line means and does

:(){ :|:& };:

From messing around with it it seems like the only part of it that works on its own is the :|:& part which displays a number and then displays an extra line after every future command entered.

Just running the line creates a constant stream of "bash fork retry resource temporarily unavailable" running as a background process.

Running it as root displayed the number again and then made redhat freeze.

Ry-
  • 218,210
  • 55
  • 464
  • 476
user2829377
  • 47
  • 1
  • 5

1 Answers1

1

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

The following fork bomb was presented as art in 2002;[5][6] its exact origin is unknown, but it existed on Usenet prior to 2002. The bomb is executed by pasting the following 13 characters into a UNIX shell such as bash or zsh. It operates by defining a function called ':', which calls itself twice, once in the foreground and once in the background. :(){ :|:& };:

Adam Zielinski
  • 2,774
  • 1
  • 25
  • 36