1

我看到这个命令张贴在某处,:(){ :|:& };:

如果我在 UNIX 中运行它会做什么,我不想尝试自己,以防它做坏事

4

2 回答 2

4

这是一个叉子炸弹,非常糟糕。

它将产生许多进程,随着每个进程再产生两个进程,数量呈指数增长。它们会阻塞您的系统,直到它倒塌。

于 2012-07-18T03:16:05.147 回答
2

不要运行它。它的叉形炸弹。它会降低你的系统。

来自维基百科:

 /- Define the function ':' without any parameters '()' as follows:
 | /- Beginning of function-block.
 | | /- Load a copy of the function ':' into memory ...
 | | |/- ... and pipe its output to ...
 | | ||/- ... another copy of the ':'-function, which has to be loaded into memory.
 | | |||   (In other words, ':|:' loads two more copies of ':', thus causing a chain-reaction)
 | | |||/- Disown the functions (make them a background process), so that the children of a parent
 | | ||||  will not be killed when the parent gets auto-killed.
 | | |||| /- End of function-block.
 | | |||| |/- End of definition. 
/-\| |||| ||/- Execute the function ':'.  The chain-reaction begins.
:(){ :|:& };:

这是链接http://en.wikipedia.org/wiki/Fork_bomb

于 2012-07-18T03:18:01.410 回答