in linux you can use the evil bird emoticon (:>) to destroy files, eg `:> important_document.txt`

the bird will eat the file and leave it completely empty!

@rebane2001 hmm I suppose thats because its writing nothing into the file but I dont understand the reason for the : (I mean yeah it does make the face but from a commands perspective I mean)

Id assume it works without?

Im guessing
: is ignored or perhaps written into the file?

@ChaosKitsune https://www.gnu.org/software/bash/manual/bash.html#index-_003a

the colon is a shell command that does nothing

it's often used to perform expansions with side-effects, like:

: ${ARGUMENT:=default value} : ${MUST_BE_SET:?error message}

@rebane2001

Bash Reference Manual

Bash Reference Manual

@dakkar @ChaosKitsune @rebane2001 so the classic fork bomb is redefining the : command?

@pacostegosaurus yep!
:(){:|:&} is equivalent to:

function :() { : | : & }or, changing the name:function bomb() { bomb | bomb & }
which calls itself twice (piping the non-exsitend output of the first call to the second) as a background process, therefore doubling the number of running processes every time (each process exits immediately, but it still bogs down the machine)

@ChaosKitsune @rebane2001

@dakkar @ChaosKitsune @rebane2001 Nice! I remember reading about this some time ago but somehow I missed that : was not only a valid identifier but actually a standard command