Friday, July 17, 2009

cool cmd

Thomas Habets' signature file (example) features a "cool command" which can bring down a system even when run as a local user:
echo '. ./_&. ./_'>_;. ./_
I'm curious how this works and I'll have to look at it more closely and post anything interesting about it that I find.

Update: A friend of mine pointed out that it is a forkbomb:

It's a forkbomb.  If you're having trouble reading it because of syntax,
it might be clearer as

echo '. foo &
. foo' > foo;
. foo

Note that on most Unices, there are configurable limits on the number of
processes any user may run concurrently, so it's usually possible to
limit the damage of a forkbomb.