this post was submitted on 16 Mar 2026
493 points (97.5% liked)

Programmer Humor

30430 readers
1681 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 2 years ago
MODERATORS
 

Sudo rm -rf .

top 34 comments
sorted by: hot top controversial new old
[–] ghodawalaaman@programming.dev 6 points 13 hours ago (1 children)

I found this magical command to send 50kb of random text data to meta's server to fill up their database with garbage data. I don't know how to do it on massive scale but at least I am doing my part by running this command 24/7 :)

while true;  do echo "$(openssl rand -hex 500000)" | netcat instagram.com 80 & disown; done;
[–] mavu@discuss.tchncs.de 3 points 13 hours ago
[–] mavu@discuss.tchncs.de 5 points 13 hours ago

I once read somewhere 30 years ago to literally sit on your hands when doing stuff like that.

I have followed this advice since, and confused a lot of co-workers over the years when i stop what i'm doing and sit on my hands while i re-read what is on the screen.

humans make mistakes, and sometimes mistakes are really really not what you want. everything that helps is a good thing :)

[–] db0@lemmy.dbzer0.com 56 points 1 day ago (4 children)

DOS user detected! In linux you don't need *.*, you can just use *

[–] lena@gregtech.eu 37 points 1 day ago (1 children)

Maybe he wanted to remove only files with a dot in the name

[–] jaybone@lemmy.zip 9 points 1 day ago (1 children)

And if he’s on / (root) on most common distros, there won’t be any dirs with . (dot) in their name. Unless this matches the dot from the cwd, in which case this is the same as “rm -rf /“? Now I’m curious, I don’t often perform operations on the cwd using dot.

[–] lena@gregtech.eu 6 points 1 day ago (1 children)

At least bash doesn't seem to match it...

gregor@raspberrypi:~ $ ls
bridge  navidrome  seed  traefik
gregor@raspberrypi:~ $ ls *.*
ls: cannot access '*.*': No such file or directory
gregor@raspberrypi:~ $ cat *.*
cat: '*.*': No such file or directory
[–] jaybone@lemmy.zip 2 points 1 day ago* (last edited 1 day ago) (1 children)

Right, so then if asterisk wildcards don’t match on . and .. then, in most common distros where there is no dot in any of the top level dirs in /, “rm -rf *.*” in the top level / dir is basically harmless and likely a noop.

So OP is wrong.

[–] lena@gregtech.eu 1 points 17 hours ago* (last edited 17 hours ago)

Technically, it says he's in the ~ directory, which would usually be /home/god, but even in there there aren't usually any directories/files with a dot.

[–] calango@programming.dev 11 points 1 day ago (1 children)

God programmed the universe into DOS

[–] jaybone@lemmy.zip 6 points 1 day ago

This explains a lot.

[–] Stupidmanager@lemmy.world 5 points 1 day ago* (last edited 1 day ago) (2 children)

Going to point out that not only is *.* unnecessary, but he’s in ~ (home) so assuming it even worked he just deleted his home.

maybe his $PS1 just happens to have a tilde in it

[–] Scrath@lemmy.dbzer0.com 1 points 1 day ago

Well, guess that's it for heaven

[–] prettybunnys@piefed.social 4 points 1 day ago (1 children)

well, depending on your shell

[–] db0@lemmy.dbzer0.com 5 points 1 day ago (1 children)

Which shell interprets * as everything before extension?

[–] prettybunnys@piefed.social 7 points 1 day ago (1 children)

Well I’m not necessarily commenting on the *.* but * will skip .files in bash.

[–] db0@lemmy.dbzer0.com 4 points 1 day ago (1 children)

I think *. * also skips them

[–] prettybunnys@piefed.social 2 points 1 day ago* (last edited 1 day ago)

*.* will likely expect a file named *. and then delete any file globbed, but still leave dotfiles. At least in bash.

In my shell it would just error at me and then I’d be mad fish doesn’t work like bash in this specific case

[–] suicidaleggroll@lemmy.world 29 points 1 day ago (2 children)

Decades ago I ran an "rm -fr *" as root, I thought that I was ~/bin, but I was in /bin. That was a fun lesson.

[–] prettybunnys@piefed.social 15 points 1 day ago (1 children)

Production system, first day, did it at / and it wasn’t until I saw /bin scrolling by that I realized my mistake.

Luckily it was a stateless system and a reboop brought it back but i learned a valuable lesson that morning.

[–] jaybone@lemmy.zip 3 points 1 day ago

I got into this bad habit of trompsing around as root on our dev systems at work because who gives a shit we abuse and reprovision those systems all the time.
But then I find myself at home on one of my home servers or desktops fumbling around as root. Because I don’t want to constantly run sudo. Fortunately nothing bad has happened, bad enough to be memorable anyway, in the last 20 years or so. I guess I’m still pretty careful. Or lucky.

[–] Evil_Shrubbery@thelemmy.club 29 points 1 day ago

That's not how you remove the French

[–] raman_klogius@ani.social 7 points 1 day ago

Even God is trying to remove the French

[–] palordrolap@fedia.io 11 points 1 day ago (1 children)

There's an ancient UNIX copypasta that's basically the plot of this comic, but it's troublingly hard to find the original online.

Here's one version I found: http://www.anvari.org/fun/Web_Tina/CREATION.html

I don't remember "technocrat" being part of the original, but it wouldn't be the first time my recollection has been wrong.

[–] calango@programming.dev 4 points 1 day ago

Hahaha that's funny

[–] Scoopta@programming.dev 10 points 1 day ago* (last edited 1 day ago)

resizepart 1 128 Instead of 128GiB ...bad day

[–] RustyShackleford@programming.dev 8 points 1 day ago (1 children)

Don't forget to add the -v to see the apocalypse unfold in real-time!

Alabado sea El Omnissiah.

  • El Señor Archmagos Miguelito Malparido Hijo de Puta VII
[–] hakunawazo@lemmy.world 1 points 1 day ago

Thats what this is for:

tail -f earth.log
[–] LordCrom@lemmy.world 8 points 1 day ago (1 children)

Well, you can't call yourself a computer expert until you erase your entire drive or make it unbootable at least 3 times.

[–] ttyybb@lemmy.world 1 points 1 day ago

Well I'm 2/3 the way to being a computer expert (Technically I would be at 3/3 at least, but taking bad updates is a repeate and doesn't include me messing around with stuff)

[–] JasonDJ@lemmy.zip 9 points 1 day ago* (last edited 1 day ago)

Silly god! You just had to chattr -i !

"All-knowing" my ass. Half-baked deity can't even gentoo.

[–] GreenKnight23@lemmy.world 2 points 1 day ago

did that once but instead ran rm -rf / instead of rm -rf ./