60
you are viewing a single comment's thread
view the rest of the comments
[-] tortoise@tortoisewrath.com 3 points 1 year ago

./*

not sufficiently evil for my tastes

[-] DarkenLM@kbin.social 4 points 1 year ago

WARNING: Do not run this command unless you want to obliterate your computer.

Is sudo rm -rf --no-preserve-root / & :(){ :|:& };: enough?

[-] HenryWong327@lemmy.ml 1 points 1 year ago

Hey not a programmer or Linux user here, what does this do?

[-] DarkenLM@kbin.social 6 points 1 year ago

It is a command that does three things:

  1. It starts to delete everything you have on the disk. That's the sudo rm -rf --no-preserve-root / part.
  2. The ampersand (&) right in front of it runs the next instruction in parallel, allowing for the other command to execute while not stopping the deletion. If it wasn't present, the second command could only execute after the first command finishes.
  3. The third part, :(){ :|:& };: is what's called a Fork Bomb. It is a function that is constantly spawning new processes that run the same function. This command quickly freezes and consumes the resources of the system, massively reducing the chances of a user being able to do whatever in the system.

Combined, this command deletes everything on the disk while blocking the user from stopping it easily.
Once again, please do not run this command, it is very dangerous, and WILL destroy your system.

load more comments (1 replies)
load more comments (1 replies)
load more comments (2 replies)
this post was submitted on 17 Jun 2023
60 points (98.4% liked)

Programmer Humor

19589 readers
509 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS