465
rm -rf /usr due to typo (sh.itjust.works)
top 42 comments
sorted by: hot top controversial new old
[-] SavvyBeardedFish@reddthat.com 154 points 4 weeks ago
[-] OwOarchist@pawb.social 138 points 4 weeks ago

rm -rf "$STEAMROOT/"* could be evaluated as rm -rf "/"* if $STEAMROOT is empty

Ah, good times.

[-] victorz@lemmy.world 33 points 4 weeks ago

Probably a good idea to enable the nounset shell option when shipping commercial-grade install scripts. 😅

[-] fruitcantfly@programming.dev 7 points 4 weeks ago* (last edited 4 weeks ago)

That really ought to have been the default behavior. Opting out only takes one or two extra characters. Well, three or four if you don't habitually bracket your variable names, which you should probably be doing anyways

[-] OwOarchist@pawb.social 4 points 4 weeks ago

Or just include the trailing slash in $STEAMROOT, so that if the variable is empty, it will evaluate to rm -rf "" and do nothing.

[-] victorz@lemmy.world 8 points 4 weeks ago

That seems like a more error-prone solution than the shell option. That would make it evaluate to rm -rf * which would probably delete your home directory, I'm guessing. And also put the burden of knowing the slash needs to be included on something completely disconnected from the expression. Nah, don't do it like that.

[-] Fmstrat@lemmy.world 19 points 4 weeks ago

I love how someone committed # scary! above it rather than fixing it.

[-] sp3ctr4l@lemmy.dbzer0.com 19 points 4 weeks ago

Wow.

That's a nuclear grade 'oopsie' right there hahaha!

[-] Cyber@feddit.uk 25 points 4 weeks ago

Jeez. Didn't hear about that one, back in the day.... wow.

[-] zitrone@europe.pub 41 points 4 weeks ago

that is why you don't run random install script as root

i hate that so many tools nowadays want you to curl | sh for installing

[-] w33n1s@lemmy.world 9 points 4 weeks ago

Glad I'm not the only one. It's always the shell apps that use annoying emojis too

[-] SpatchyIsOnline@lemmy.world 6 points 4 weeks ago

i hate that so many tools nowadays want you to curl | sh for installing

Using NixOS has the advantage of making me not want to touch these tools. If I can't install it reproducibly with Nix, I'll just look for an alternative :)

[-] zitrone@europe.pub 1 points 3 weeks ago
[-] iocase@lemmy.zip 1 points 3 weeks ago

Yeah pipe that shit into a file and check first unless you really really trust the project.

[-] supermurs@lemmy.world 24 points 4 weeks ago

"Just a prank bro!"

[-] Kazel@lemmy.dbzer0.com 24 points 4 weeks ago
[-] TwilightKiddy@programming.dev 13 points 4 weeks ago

What do you mean? Hitting space while typing out a path is very much a typo. Am I missing something?

[-] vanillama@programming.dev 20 points 4 weeks ago

They're jokingly implying it was intentional

[-] Kazel@lemmy.dbzer0.com 8 points 4 weeks ago

yeah you missed the joke i guess

[-] TwilightKiddy@programming.dev 6 points 4 weeks ago
[-] Kazel@lemmy.dbzer0.com 12 points 4 weeks ago

"hahaha ubuntu users take this"

[-] TwilightKiddy@programming.dev 5 points 4 weeks ago
[-] axx@slrpnk.net 10 points 4 weeks ago

This is from 15 years ago. How many more times will we have to see it?

[-] who@feddit.org 8 points 4 weeks ago
[-] nil@piefed.ca 7 points 4 weeks ago

That's what you get for using Ubuntu

[-] TrickDacy@lemmy.world 24 points 4 weeks ago

Kind of an asshole statement tbh

[-] nil@piefed.ca 2 points 4 weeks ago

Ubuntu tries to become (or is already) the de facto standard. That is what assholes do.

[-] TrickDacy@lemmy.world 13 points 4 weeks ago* (last edited 4 weeks ago)

We should probably burn down the homes of people who use it then /s

[-] nil@piefed.ca 8 points 4 weeks ago

Honestly, I meant it for a joke, but people started taking it seriously, I don't know where to end this.

[-] TrickDacy@lemmy.world 6 points 4 weeks ago

Hmm alright. I too dislike some things about Ubuntu but on the other hand you cannot blame people (myself included) who either have tried other distros and had support issues and came back to Ubuntu based, or those who just want the easier route to begin with. Ubuntu-based seems to be a good compromise for many. I've also used arch and fedora and had more headaches and breakages on those. Also I literally have a laptop that gets supported on Ubuntu so it makes life easier all around. Fuck some of the things canonical does but I just do not want to spend time with things like fixing my wifi connection after running pacman -S install or whatever that command is.

[-] nil@piefed.ca 2 points 4 weeks ago* (last edited 4 weeks ago)

Yeah, but I think forks of Ubuntu such as Mint or Zorin deserves more recognition as first Linux distro. Choosing Ubuntu just because everyone else is using just feels very wrong.

I too got tired of using those niche distros and once settled on Solus (but now using NixOS for some reason).

[-] TrickDacy@lemmy.world 1 points 4 weeks ago

Well imo, on lemmy anyhow, they do get a million times more recognition. Everyone is in the cult of Mint, which is one of the few I tried briefly and actively did not like it.

[-] nil@piefed.ca 3 points 4 weeks ago

On Lemmy yes, but we're in a filter bubble. To average Windows users Linux equals Ubuntu.

[-] kalpol@lemmy.ca 3 points 4 weeks ago
[-] nil@piefed.ca 2 points 4 weeks ago

close, but I use NixOS

[-] Mr_Dr_Oink@lemmy.world 9 points 4 weeks ago

Is ubuntu bad? I use mint as i am fairly new to linux.

[-] sbeak@sopuli.xyz 23 points 4 weeks ago

Ubuntu is owned by Canonical, and they have been making some decisions that a lot of people in the community don't like, most notably, the enforcement of snaps (in a nutshell, the repos are proprietary and centralised), but they have been involved in various other corpo shenanigans as well

But I don't think "X distro is bad, don't use it" is very useful unless it is dangerous or harmful to the user.

Ubuntu (or the various other buntus) work for some people, and without them, far fewer people would use Linux. The benefit of Linux is the amount of choice you get and being able to easily switch between distros (you can even dual boot if you want!)

So if you like Mint, stick with that. If somebody prefers the buntus, it's great as long as they are respectful to others!

Distro wars are stupid

[-] forestbeasts@pawb.social 2 points 4 weeks ago

Oh and BTW Mint is fine! It's based on Ubuntu sure, but actively undoes and strips out the crappy stuff Ubuntu adds.

They also have Linux Mint Debian Edition as a backup in case Ubuntu goes really evil.

-- Frost

[-] MrKoyun@lemmy.world 12 points 4 weeks ago

It's not really bad. It's just kinda distasteful due to stuff like Snap packages and Canonical's position of privacy as a company. But it isn't really a bad distro if you ignore that stuff. If it works it works.

[-] nil@piefed.ca 10 points 4 weeks ago

Ubuntu kinda forces you to use snap (which sucks), and is owned by Canonical.

Neither of them apply to Linux Mint, so nice choice.

[-] prime_number_314159@lemmy.world 4 points 4 weeks ago

Yeah, what were they thinking, using Ubuntu in 2011?

[-] BlastboomStrice@mander.xyz 1 points 4 weeks ago

I think I had accidentally deleted /bin with that script I had made when I was testing debian https://github.com/BlastboomStrice/3rdPartyAutoUpdater

this post was submitted on 24 Jul 2026
465 points (100.0% liked)

Programmer Humor

32901 readers
179 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 3 years ago
MODERATORS