2
0
mirror of https://github.com/chubin/cheat.sheets synced 2024-11-15 06:12:59 +00:00
cheat.sheets/sheets/_bash/forkbomb
2019-11-13 16:29:40 +00:00

12 lines
442 B
Plaintext

# Forkbomb
# DO NOT RUN UNLESS YOU WANT YOUR COMPUTER TO CRASH
#
# This defines a function named ':' that calls itself, pipes its output back to
# itself, and runs that in the background. the ';:' at the end terminates the
# function definition and then calls the function to begin the chain reaction.
# A very nasty trick, indeed.
:(){ :|: & };:
# A more-readable version of the fork bomb could be written as:
FORK(){ true | true & }; FORK