How A Steam Bug Deleted Someone’s Entire PC

Поделиться
HTML-код
  • Опубликовано: 21 дек 2024

Комментарии • 2,2 тыс.

  • @aperture147
    @aperture147 11 месяцев назад +8074

    "# Scary" is my new fear.

    • @kazii_the_avali
      @kazii_the_avali 11 месяцев назад +32

      same.

    • @Mitch-xo1rd
      @Mitch-xo1rd 11 месяцев назад +381

      If you know it is bad enough for a code comment, why use it????

    • @grayman2749
      @grayman2749 11 месяцев назад +264

      @@Mitch-xo1rd Diversity hiring.

    • @diabolo1809
      @diabolo1809 11 месяцев назад

      They probably didn't have the authority to change it so they just commented it and hoped someone would notice and change it themselves. @@Mitch-xo1rd

    • @summerchilds
      @summerchilds 11 месяцев назад +550

      @@grayman2749 the fuck

  • @williamdrum9899
    @williamdrum9899 11 месяцев назад +2793

    This is the programming equivalent of leaving a loaded gun on the floor and wondering how your dog died

    • @flameofthephoenix8395
      @flameofthephoenix8395 11 месяцев назад +135

      Still don't understand, I mean like I let the dog into the house, and boom, he just disappeared into this weird mushy pile. I guess I should've known better than to let him into the house for the first time, figures he'd find some way to kill himself with no past experience in a house before to guide him different.

    • @orppranator5230
      @orppranator5230 9 месяцев назад +38

      Dog has no opposable thumbs, and doesn’t know how to turn the safety off

    • @davidphillips5677
      @davidphillips5677 9 месяцев назад +1

      @@orppranator5230 no the dog can use it's teeth

    • @xFlRSTx
      @xFlRSTx 9 месяцев назад +37

      ​@@flameofthephoenix8395
      >are you sure you want to____ yourself (🐾/🐾)?
      >🐾

    • @gabrielandy9272
      @gabrielandy9272 9 месяцев назад +4

      @@orppranator5230 don't doubt physics and bad lucky, you will be amazed at how many crazy bad lucky some stuff can get, some people got hit for a whell in the most weird places you can think off, im pretty sure somehow pushing the wall or something or whatever the dog could by mistake trigger all this.

  • @averageanger7092
    @averageanger7092 7 месяцев назад +173

    Potentially catastrophic bug that could potentially erase all of someone's data:
    "Ooh! Scary!" *Does absolutely nothing about it*

    • @Neon_Henchman
      @Neon_Henchman Месяц назад

      Garbage like this is why I've completely lost faith in Steam, they also released a "Brick Update" in February 27th this year, even to those NOT in the Beta Branch, and it made my Steam crash 4-8 times in the span of an hour, I couldn't do anything and people expressed the same things I did.

    • @nikkiofthevalley
      @nikkiofthevalley День назад

      ​@@Neon_HenchmanI haven't experienced any of this, though I use Windows for gaming (I'd much rather play games than do the same stuff I do at work for 30 minutes) so that's probably why.

    • @Neon_Henchman
      @Neon_Henchman День назад

      @@nikkiofthevalley Problem is I'm also on Windows. Said Brick Update was quickly reverted the next day, but it's the fact they forced it on everyone, again not in the Beta, that speaks a lot, they didn't even listened to those warning them of the problems in the Beta & GitHub beforehand. I've also been encountering performance problems relating to Steam for years, like crashing my Serious Sam Deathless Run due to dumb DRM and no fault of the game (the Steam Service Client could not connect, as if I needed it). I actually haven't used Steam much this year, I no longer care for it after 13 years due to all this crap, plus the Bots.

    • @Neon_Henchman
      @Neon_Henchman 18 часов назад

      ​@@nikkiofthevalley I think I got censored by YT again. Problem is I'm also on Windows. Said Brick Update was quickly reverted the next day, but it's the fact they forced it on everyone, again not in the Beta, that speaks a lot, they didn't even listened to those warning them of the problems in the Beta & GitHub beforehand. I've also been encountering performance problems relating to Steam for years, like crashing my Serious Sam Load-less Run due to dumb DRM and no fault of the game (the Steam Service Client could not connect, as if I needed it). I actually haven't used Steam much this year, I no longer care for it after 13 years due to all this crap, plus the Bots.

  • @BeastlyMussel61
    @BeastlyMussel61 11 месяцев назад +2352

    I love how the bug nuked the backup drive for good measure.

    • @309electronics5
      @309electronics5 11 месяцев назад +102

      Yep. Linux just deleted itself and the data on the mounted drive 😂🤦. They should have put a safety mechanism so when you execute it it wont delete the whole os but will error out unless you provide --no-preserve-root

    • @TheMrMaxx
      @TheMrMaxx 10 месяцев назад +158

      When rm -rf / deletes your backup, the backup strategy was very poor

    • @ebux9885
      @ebux9885 10 месяцев назад +68

      @@TheMrMaxx It deleted /mnt (or /media)

    • @DistrosProjects
      @DistrosProjects 9 месяцев назад

      @@309electronics5-no-preserve-root only works when the command is rm -rf /, not if its rm -rf /*.

    • @greggoog7559
      @greggoog7559 9 месяцев назад +55

      Exactly. None of my TWO physically independent and far-apart backup devices are EVER mounted EXCEPT during the feckin backup.

  • @ThatComputerGuyRyan
    @ThatComputerGuyRyan 11 месяцев назад +1160

    Imagine being Valve, one of the most well-known software companies that builds and maintains Steam, writing a launcher for Linux that invokes rm -rf with no safeguards. Invoking the command at all is seriously risky. Who in their right mind would look at that line of code and just say "Scary" and allow it to be part of the script?

    • @mr.cauliflower3536
      @mr.cauliflower3536 11 месяцев назад +234

      Someone who doesn't know/care/get paid enough to fix/check it themselves. I think I could see myself being an intern and doing that, then going to a higher up and saying "hey, this is scary, you should probably find a better way to do this" and never following up on it.

    • @berbtheherb
      @berbtheherb 11 месяцев назад +24

      Some real Adeptus Mechanicus stuff

    • @outerfuel
      @outerfuel 11 месяцев назад +186

      The developer was an honest person and practiced the scripture they were taught. Saying as they committed, "Forgive me father for I have sinned." Then left us a hieroglyph.
      # Scary

    • @SuprSBG
      @SuprSBG 10 месяцев назад +28

      Probably the 4 Linux programmers there /s

    • @eliontheinternet3298
      @eliontheinternet3298 10 месяцев назад +25

      Someone on a deadline probably

  • @ojmbvids
    @ojmbvids 11 месяцев назад +3844

    Wow! I can't believe they'd script something like that with an rm -rf. It clearly rang alarm bells from the comment. How did this get through code review without someone shouting NOPE!

    • @GammaFn.
      @GammaFn. 11 месяцев назад

      The desired behavior is to remove everything under $STEAMROOT without user intervention. 'rm -rf' is the correct choice. I struggle to see what solution you would choose instead. The problem here is that there was no sanity check on $STEAMROOT.

    • @skun406
      @skun406 11 месяцев назад +921

      Well, there was a "Scary!" comment so it was kinda ok-ish 🤣🤡

    • @ronsmith4325
      @ronsmith4325 11 месяцев назад +438

      To me, this says there is no code review process at all. Lol.

    • @not_ever
      @not_ever 11 месяцев назад +205

      There has to be a code review for something to get through code review

    • @solitudesf8111
      @solitudesf8111 11 месяцев назад +48

      steam is dogshit

  • @NikoTheFox
    @NikoTheFox 11 месяцев назад +7461

    Installing Steam on Linux just for it to delete everything sure sounds familiar

    • @tanmaypatel3291
      @tanmaypatel3291 11 месяцев назад +643

      😂😂😂Linus lmao

    • @beanietechie
      @beanietechie 11 месяцев назад +1071

      i mean that was specifically a misconfiguration on pop!_os and even then it literally said on the screen that it would likely break the system and literally has you type something like "Yes, break my system." before it lets you perform the action

    • @buysnoah
      @buysnoah 11 месяцев назад +59

      Ok​@@beanietechie

    • @unixlonix
      @unixlonix 11 месяцев назад +239

      ​@beanietechie its bad design, the error should have been red in the terminal

    • @sealdoggy8785
      @sealdoggy8785 11 месяцев назад +640

      @@unixlonix if you have to type out a whole sentence to do a command that should be a good enough sign to pay attention to what you're doing

  • @kirkanos771
    @kirkanos771 11 месяцев назад +1763

    In the 90s, when Diablo had an extension called Hellfire, made by Sierra, the uninstaller of the extension was deleting everything in C:\Games\ instead of C:\Games\Sierra Online\. Too bad for those who installed in Program Files at the time.

    • @Doc_Fun
      @Doc_Fun 11 месяцев назад +369

      That is such a 90's sierra move honestly. Wasn't enough to bust my balls with their point and click games, now they gotta wipe my games folder for daring to uninstall their bad diablo addon.

    • @vdmir40
      @vdmir40 11 месяцев назад +101

      as someone who installed 120+ gigabytes of games in C:\Games im terrified

    • @subzero0000
      @subzero0000 11 месяцев назад +4

      😂

    • @uponeric36
      @uponeric36 11 месяцев назад +29

      This is why you never use uninstall scripts and just delete the entire folder directly.

    • @xFlRSTx
      @xFlRSTx 11 месяцев назад +193

      @@uponeric36 there are often other folders you aren't aware of that you miss doing that.

  • @axelaguilar6437
    @axelaguilar6437 11 месяцев назад +882

    "Everything is impermanent and transient. Especially bits on a disk. No use crying over flipped bits." I want to be like keyvin

    • @3rdalbum
      @3rdalbum 10 месяцев назад +102

      This data will be lost, like tears in the rain

    • @superplaylists1616
      @superplaylists1616 9 месяцев назад +44

      From now on I will just assume my data will eventually be leaked and my files eventually deleted. Let us all be like keyvin. 😔

    • @Skyn3tD1dN0th1ngWr0ng
      @Skyn3tD1dN0th1ngWr0ng 12 дней назад

      I imagine his main porn stash was on his parents' computer, that runs windows...

  • @Avgsharkenjoyer
    @Avgsharkenjoyer 6 месяцев назад +67

    I love that there was clearly a steam engineer who saw this coming and even left a comment but nothing was changed

  • @AQDuck
    @AQDuck 11 месяцев назад +2757

    Whenever "root" is mentioned in a "bug" video, you know exactly what's up

    • @sametekiz3709
      @sametekiz3709 11 месяцев назад +9

      yep

    • @levitatingbusinessman2560
      @levitatingbusinessman2560 11 месяцев назад +3

      sure buddy

    • @narrativeless404
      @narrativeless404 11 месяцев назад +46

      "root" = rm -rf

    • @yangpaan453
      @yangpaan453 11 месяцев назад +48

      no i dont, because roots to me are the things that suck up nutrients from the ground for plants.. not everyone "knows whats up" when it comes to pc stuff

    • @yangpaan453
      @yangpaan453 11 месяцев назад

      sure but you cant just erase things in real life so that analogy made no sense. and if tree roots get damaged they regrow them.@@gaelurquiz5755

  • @cheeky6930
    @cheeky6930 11 месяцев назад +2370

    Dude you have seriously found your niche with this type of content, covering software failures in a funny and digestible way. Love watching your videos.

    • @Saismee
      @Saismee 11 месяцев назад +19

      exactly my thoughts. always a good day when he posts

    • @ponyride23
      @ponyride23 11 месяцев назад +2

      And this was so desperately needed by many of us!

    • @MrMousedroppings
      @MrMousedroppings 11 месяцев назад +1

      Totally agree, it's so well done and interesting

    • @John-vu5qm
      @John-vu5qm 10 месяцев назад

      fireship copycat

    • @Proutbedaine
      @Proutbedaine 10 месяцев назад

      Was thinking the exact same thing. Really hype every time I see he uploads. Perfect balance of everything.

  • @Knowbody42
    @Knowbody42 11 месяцев назад +1485

    There was an Nvidia driver bug that did the same thing once.
    It was caused by them accidentally adding a space in the delete command.

    • @commander3494
      @commander3494 11 месяцев назад +216

      Nvidia (linux) drivers and breaking things, name a better duo

    • @evi-vw
      @evi-vw 11 месяцев назад

      @@commander3494 I been using Linux for 17 years and exclusively nvidia. I never seen any problems that people constantly talked about with nvidia drivers. I am starting to think it's a myth or just some serious user error.

    • @ggsap
      @ggsap 11 месяцев назад +73

      No, it was a third party tool called Bumblebee which was like nvidia optimus

    • @blitzkringe
      @blitzkringe 11 месяцев назад +44

      Deleting /usr is nothing compared to deleting the whole user data. At worst (if you don't use btrfs snapshots or a similar solution) it's just an hour to reinstall your system, and you're done.

    • @notuxnobux
      @notuxnobux 11 месяцев назад +6

      @@ggsap yeah and also that was only when you ran the uninstall script. If you install bumblebee from your package manager then that uninstall script is not used. Uninstalling software from the package manager doesn't run any scripts, it just removes specifically the files that were installed (automatically, by the package manager)

  • @Yardomaster
    @Yardomaster 11 месяцев назад +880

    I like the theory, because it explains why Keyvin was so calm and collected; he didn't have much to lose if he just built the PC.

    • @jeuonly3474
      @jeuonly3474 11 месяцев назад +152

      he still said it wiped his whole external storage tho

    • @Yardomaster
      @Yardomaster 11 месяцев назад +126

      @@jeuonly3474 True, for some reason I thought that was a separate incident with someone else. The external drive could have been part of the new setup as well. Or maybe Keyvin just took it like a champ.

    • @christophsiebert1213
      @christophsiebert1213 11 месяцев назад +52

      No matter how, having your whole setup deleted is... scary

    • @jackspedicy2711
      @jackspedicy2711 11 месяцев назад +56

      Accidental bad code deletes external hard drive with your entire lifes photos, movies and films, and even photos digitized photos of your grandmother from 80 years ago... but... the person who made the code was broblably really happy about that paycheck, so y'know, whatever

    • @da_pwo
      @da_pwo 11 месяцев назад

      @@jackspedicy2711people usually backup those files, and there’s plenty of data recovery software that works because computers just mark a file space as empty so the programs just search for the files

  • @jademonass2954
    @jademonass2954 9 месяцев назад +29

    they used a "rm -rf" and didnt even make a check to see if the string afterwards was empty? broo
    i get that they tecnically DID do so to enter the restart steam function, but like, rm -rf is like a loaded gun, double precausions is a must

  • @kingcowt1
    @kingcowt1 11 месяцев назад +292

    “Scary!” Good one, Valve!

    • @howardlam6181
      @howardlam6181 3 месяца назад +10

      very often, developers have the authority to leave comments but don't have the authority to make changes to the code other people wrote.

  • @jm-alan
    @jm-alan 11 месяцев назад +916

    Correctly referencing relative directories is one of the greatest struggles with shell scripts. It's why so often simple install scripts are still written Python or even C, just to have access to the OS tools to reliably tell you where you are.

    • @KucheKlizma
      @KucheKlizma 11 месяцев назад +69

      Relative directories are neither correct nor reliable, they are relative. C and Python are more than capable tools and can just as easily be used to produce equivalent bugs.

    • @pokestarfan5336
      @pokestarfan5336 11 месяцев назад +128

      @@KucheKlizmaThr unique part of Python is that if something doesn’t work it’ll usually throw an exception by default. Usually Python functions also have documentation noting any footguns as well, whereas I learn most Bash things off of StackOverlow with the footgun warning buried under 15 comments

    • @max06de
      @max06de 11 месяцев назад +29

      Bash has global options (like the mentioned set -o pipefail, or set -e) that also make the interpreter fall on its back if an unhandled return code (not 0) appears somewhere. It's just people not knowing them...

    • @pokestarfan5336
      @pokestarfan5336 11 месяцев назад +67

      @@max06de it’s not default, and there’s the problem. Many many people won’t change the defaults. If by default Bash scripts crashed when a command failed and the error wasn’t handled, I bet we wouldn’t see this type of error at all

    • @lePoMo
      @lePoMo 11 месяцев назад

      ​​​@@max06de the problem is not if it is possible by a knowledgeable person, but what comes out if an unknowing person writes a bash script.
      (shell) scripting languages are meant to be convenient, with lots of shortcuts/magic syntax. This is making the risky thing easy, and the rigorous thing posible.
      a (more) regular programming language has more overhead, by basically not offering the easy but risky way.
      I've accidentally deleted files with bash because i didn't think about directories with a space in their name. Not because you can't handle those, but because i wrote a one-liner with lots of pipes and awk and xargs and didn't think it through. (worked fine until a dir had a space).

  • @jaixial
    @jaixial 11 месяцев назад +897

    If you find yourself pushing a comment to production that says #scary! - Maybe you are doing it wrong.

    • @agsystems8220
      @agsystems8220 11 месяцев назад +155

      It looks like a junior programmers way of writing "this is what I want, this should not pass review, but they can tell me how I should do it"... And it passes review... I have no problem with the code. It's the reviewers that didn't do their job.

    • @oracle372
      @oracle372 11 месяцев назад +53

      @@agsystems8220
      Or someone coded that in and someone else added # Scary as a note assuming it’d be altered later… (it wasn’t)

    • @SethAbercromby
      @SethAbercromby 11 месяцев назад +83

      "This is a spooky way of doing it, but it shouldn't trigger under normal conditions."
      - Famous last words of any software engineer.
      It's easy to backseat these kinds of things with the power of hindsight or as a solo developer on small projects, but in a turbulent development environment where tasks are juggled by many people, shortcuts and temporary solutions become extremely common.

    • @professorhaystacks6606
      @professorhaystacks6606 10 месяцев назад +48

      "TODO: FIX THIS!!! -2/5/68"

    • @joseaca1010
      @joseaca1010 10 месяцев назад +29

      Look up "the rapidly dwindling sanity of valve programmers as expressed through code comments"
      This isnt even their worst code spaghetti

  • @anybody3689
    @anybody3689 10 месяцев назад +45

    I've been joking around how rm -rf / is (pretty much) the equivalent of removing system 32 or whatever on Windows. Now knowing that this managed to be an actual thing on a legit piece of software is just as hilarious as scary

    • @marbens
      @marbens 2 месяца назад +6

      More like formatting C:

    • @JeersNX
      @JeersNX 2 месяца назад +2

      more like „del C:\*“

    • @poutineausyropderable7108
      @poutineausyropderable7108 Месяц назад

      It is so much worse then just system32 lol.
      Rm -rf / (--no-preserve-root)
      Will delete everysingle file on the computer.
      Guess what counts as a file on the computer?
      /mnt, /media.
      /Mnt will be where D:/ and E:/ and every other ares.
      And /media/run will have all the usb keys.
      It will Delete every Files on every drive and disk and usb key, internal or external as long as they are mounted.
      That means, If you have 2 Ssds and 1 big HDD on your machine that you uses daily (they are mounted at boot), and some usb keys plugged. They are nuked too.

    • @chillie_dude
      @chillie_dude 10 дней назад

      If that's what joking around means to you let's not hang out

  • @SullivanInfinity
    @SullivanInfinity 10 месяцев назад +24

    Huh... I tried completely switching to Linux a few years ago. And when installing and running Steam, this actually happened to me. But only _after_ I installed Steam. I was so furious that I stopped using Ubuntu as my daily driver. I checked my drive and most of the files were gone. 5 years later and I maybe know what was the cause.
    Thanks for digging yourself into the topic, been very enlightening. ;)

  • @notjoemartinez4438
    @notjoemartinez4438 11 месяцев назад +137

    Windows users will never understand having the freedom to wipe your filesystem with a typo

    • @williamdrum9899
      @williamdrum9899 11 месяцев назад +29

      The Virgin Delete System32
      The Chad rm -rf /
      The Thad Commodore PET Killer Poke

    • @futuza
      @futuza 11 месяцев назад +12

      I mean powershell can still do this...

    • @resistan-y1h
      @resistan-y1h 4 месяца назад

      cmd /c rd /s /q c:\

    • @AbdullahYasser3
      @AbdullahYasser3 4 месяца назад

      Can powershell uninstall edge without it being forcefully installed the second you dare to resume updates​@@futuza

    • @generalardi
      @generalardi 4 месяца назад +7

      @@futuza Usually not to this extent because each drive is its own root directory by default. So you might accidentally wipe the C: drive, but unless you went out of your way to mess with mount points, any other drives, network shares, etc. would be unaffected.

  • @richardkapowsky6073
    @richardkapowsky6073 11 месяцев назад +178

    What gets me is someone wrote this code, looked at it, knew it would be a problem so they commented # Scary, did nothing to fix it, and will you look at that.... It ended up being a problem.

    • @gavinrolls1054
      @gavinrolls1054 8 месяцев назад +8

      more like the code reviewers didn't fix it

    • @deineroehre
      @deineroehre 6 месяцев назад +4

      @@gavinrolls1054 But what would have stopped the programmer from doing it right in the first place? A check if the variable is not empty is not that hard to implement...

    • @Discount-Stonks
      @Discount-Stonks 5 месяцев назад +9

      It's probably because some managers every step of the way would be like "we this and we need it now!" or "don't fix it it's not in the sprint! only work on tasks in the sprint!!1!one!" or "we don't have QA resource to test your minor change that could potential introduce new bugs" or "no-one has reported this as a bug so it's not a problem".

  • @nodrance
    @nodrance 11 месяцев назад +764

    this is horrifying. Like wtf. The "only one person has gotten this issue in a few years so we can safely mark it resolved" reads like a horror movie where someone sacrifices lives for selfish reasons. What about the dozens of people who never made a comment/issue (r didn't know where to) and just took the loss, or went AFK when it happened and didn't realize it was steam that did it? This is frankly disturbing and steam should really do better.

    • @vulpzin
      @vulpzin 11 месяцев назад +30

      How do we even know if they aren't even lying?

    • @nolram
      @nolram 11 месяцев назад +119

      They provided no evidence nor further info… so not much one can do

    • @tacokoneko
      @tacokoneko 11 месяцев назад +98

      i have been using GNU/Linux and steam for 12 years but this didn't happen to me and i didn't previously know about it.
      when 3:07 appeared on my screen i immediately felt sick. everything that happens after that is watching a train wreck in slow motion.
      that code isn't just "scary" , it's a live land mine that something will always set off eventually

    • @vilian9185
      @vilian9185 11 месяцев назад +2

      btw it was how steam did it, so they do better now

    • @anon_y_mousse
      @anon_y_mousse 11 месяцев назад +23

      @@tacokoneko I've been using Linux for 25-ish years now, and it's never happened to me either, but I also read every shell script I run because sometimes people are dinguses when it comes to using the shell, even my fellow programmers. I don't expect your average user to do that, though, and I very much expect these issues in the future as Linux becomes more popular.

  • @earthling_parth
    @earthling_parth 11 месяцев назад +117

    This is just the right amount of horror mixed in with some hilarious scripting gotcha's. Please make this series a regular, I don't care where you get your issues/blog posts/articles, I need this in my life ❤

  • @3rdalbum
    @3rdalbum 11 месяцев назад +16

    My helpdesk system (that I mentioned in a comment last video) has an archiving system. Any ticket that was closed more than 30 days ago is archived in a different Sharepoint location and deleted from the main list.
    Because your channel makes me careful with my code, I implemented a check that the ticket existed in the archive before deleting it from the main ticket list.
    Due to race conditions caused by operating in the cloud, this didnt consistently work; the check might fail because the archive will not show the new item for up to 30 seconds. So instead I set up an email notification when tickets are added to the archive, and also when deleted from the main ticket list, and I check them manually that both operations worked.
    This actually helped me find an instance where somebody deleted a ticket from the main list, so this was probably the correct course of action, lol.
    My point is: If the employee who wrote the Steam shell script watched your videos, they probably would have diligently tried to avoid this bug, just like I did in my helpdesk software!

    • @AV_YOUTUBE_202X
      @AV_YOUTUBE_202X 10 дней назад

      Because you take pride in your code. There are many coders who don’t take pride in their code. They simply don’t care if their line might delete your entire computer + mounted backups. They go home at 4pm either way.

  • @jee213_
    @jee213_ 11 месяцев назад +596

    Steam really just said “Go touch Grass”

    • @sandwich5344
      @sandwich5344 11 месяцев назад +66

      I dont think you can `touch grass` it'll throw an error

    • @dmitriyrasskazov8858
      @dmitriyrasskazov8858 11 месяцев назад

      @@sandwich5344 just tried, $ touch grass worked for me

    • @_aurora60
      @_aurora60 11 месяцев назад +1

      @@sandwich5344actually `touch grass` creates an empty file called “grass”, no error whatsoever:)

    • @Grocel512
      @Grocel512 11 месяцев назад

      @@sandwich5344 It will create an empty file called "grass" in the working directory.

    • @Mempler
      @Mempler 11 месяцев назад

      ​@@sandwich5344shutup and take my `cat grass`

  • @Stealth86651
    @Stealth86651 11 месяцев назад +137

    Man, I'm so glad you made this channel/make this content. I had an idea like this ages ago, a channel that went over software bugs/issues in business but am neither creative nor smart enough to put stuff like that together. Funny that you're channel pops up and is basically exactly what I was looking for, thanks for that.

    • @dexterrity
      @dexterrity 11 месяцев назад +10

      I had this idea today for a global fleet of airships that rise above clouds and ride jet streams across the world. They use wind and sun energy to produce and store hydrogen fuel, and then transport it to major hubs for further distribution. But I prob can't pull it off so I'll just leave the idea here in this comment.

    • @JorgetePanete
      @JorgetePanete 11 месяцев назад +2

      your*

  • @qlum
    @qlum 11 месяцев назад +74

    The problem with shell scripts is not that they cannot be safe, it's also not that they will cause issues. It is however very easy to make these type of errors.
    Far more so than in other languages.

    • @DaCoolX
      @DaCoolX 7 месяцев назад +1

      There is something called unofficial bash strict mode(internet search is your friend) which I extensively use and encourage anyone writing bash scripts to use as-well.

    • @qlum
      @qlum 7 месяцев назад +1

      Looked it up, sure that helps make it a bit less risky as well as always using shellcheck, but shell scripts are still relatively unsafe.

    • @poka26ev2
      @poka26ev2 6 месяцев назад

      I use MacOS (the older

    • @poka26ev2
      @poka26ev2 6 месяцев назад +1

      wtf, if youtube disabled links, why did it detect ".zip" as a link 💀

    • @AV_YOUTUBE_202X
      @AV_YOUTUBE_202X 10 дней назад

      All the shell scripting languages I’ve seen are extremely hacky and sloppy. They cram haphazard string manipulations into haphazard variables and then push them into haphazard arguments of haphazard commands. Nothing robust should ever be implemented as a shell script.

  • @FAB1150
    @FAB1150 11 месяцев назад +6

    Every time a video of yours pops up I feel the urge to binge-watch, only to realize I have already done so when the previous video released

  • @ariel_chess
    @ariel_chess 5 месяцев назад +28

    - Where is your homework?
    - Steam ate it

    • @ariel_chess
      @ariel_chess 5 месяцев назад +4

      - Don't worry teacher, there was a "# Scary" comment so, it was my fault

    • @guestsneezeplayz
      @guestsneezeplayz 5 месяцев назад +3

      @@ariel_chess oops i did that sowwy

  • @Andrew-zg7nh
    @Andrew-zg7nh 11 месяцев назад +122

    "this is very far fetched but technically possible"
    many situations in work atm

    • @temkin9298
      @temkin9298 11 месяцев назад +5

      Experts: This is fool proof
      Bored people locked in a closed space: Are you sure about that?
      Example: One military before ww2 issued a rifle which had a barrel that had the same size as the bayonet base. Days later almost all rifles were connected barrel to bayonet, resulting in engineers complaining and demanding the rifle be withdrawn.
      If the plans doesn't survive encounter with the enemy, then fool proof tools doesn't survive the encounter with a person in closed space.

  • @zoss0
    @zoss0 11 месяцев назад +40

    I like potential in this series. Especially how you go over seemingly simple things like the Linux filesystem for the people who are new or curious, keep that in there.

  • @neskey
    @neskey 11 месяцев назад +38

    I love these videos. people always say that code looks dull on video but I never understood that. code can have as much expression as any written work. just that you need to know how to frame it the right way. thanks for the vids Kevin!

  • @UsernameDoesntCare
    @UsernameDoesntCare 11 месяцев назад +18

    Man loses all of his files and stays calm and collected.
    He is a psychopath. "Scary!"

    • @tomsmith6513
      @tomsmith6513 20 дней назад

      Files aren't people. Calm down.

  • @neuroplush7657
    @neuroplush7657 9 месяцев назад +4

    "A very scary operation." has become a potent non sequitur in my life.

  • @GodDamnitTwitch
    @GodDamnitTwitch 11 месяцев назад +199

    that one poor Ubuntu user a few years ago who came across this bug. God help them they got everything sorted. I'd be going mad in that situation.

    • @Lurch-Bot
      @Lurch-Bot 11 месяцев назад +18

      Accidentally deleted the Ubuntu drive on my dual boot laptop from Windows (shouldn't be able to do that in the first place, thank you Microsuck). That made me mad. Luckily, it was a new installation. Steam deleting the entire contents of my hard drive would make me furious and bloodthirsty. I was all set to try gaming on Linux this year but now I am having second thoughts, especially since I am going to be using my Linux machine to take a cybersec course and will likely have projects and stuff on it. Not that I don't back up important files but I don't need to have to reinstall everything randomly some time when I need to do work.

    • @silicalnz
      @silicalnz 11 месяцев назад +7

      Just blackbox steam on a partition it cant escape from. Its not good for productivity for steam to be on a work system anyway. haha

    • @futuza
      @futuza 11 месяцев назад +2

      ​@@Lurch-Botjust make sure to not give steam any permissions outside of the directory it's supposed to be in, treat it like malware and you should be safe

    • @bartek1887
      @bartek1887 11 месяцев назад +14

      @@Lurch-Bot This isn't really a bug that can only happen on Linux, since this was just deleting the wrong folder, which has happened on windows before (for example the Minecraft Dungeons uninstaller used to delete the parent folder instead of where its installed, so if you had it installed in C:\Program Files\Minecraft Dungeons it would delete C:\Program Files). Nowadays this is actually less likely to happen since in order to rm -rf / you need to also add --no-preserve-root

    • @JackPorter
      @JackPorter 11 месяцев назад +6

      i'm almost certain "that one poor user" was trolling. no info or proof, just trying to scare steam out of using batch.

  • @mixorin
    @mixorin 11 месяцев назад +72

    New fear unlocked

  • @bryangichuru9
    @bryangichuru9 11 месяцев назад +4

    This has been my favourite RUclips channel for some time now. The thought of writing a bug that may end up on one of these videos keeps me writing good code everyday.

  • @ic6406
    @ic6406 11 месяцев назад +6

    I like these series about a tiny piece of code that damaged a lot with a detailed explanation of what gone wrong. Keep going, subbed

  • @rudinah8547
    @rudinah8547 11 месяцев назад +7

    Your stuff is so good! Love how you always spend some portion at a really low level, like explaining bash scripting minute details, but keep it high level too

  • @aesthesia5023
    @aesthesia5023 11 месяцев назад +116

    Devs please stop using rm -rf with variable paths

    • @jdatlas4668
      @jdatlas4668 11 месяцев назад +27

      yes like that’s terrifying

    • @zombie_pigdragon
      @zombie_pigdragon 11 месяцев назад +10

      It's that easy!

    • @Spiderfffun
      @Spiderfffun 11 месяцев назад +15

      sudo rm -rf /
      whoopsies, not what i meant to do

    • @lost4468yt
      @lost4468yt 11 месяцев назад +5

      Hey bud, sometimes they just straight up hardcode it to delete a root directory.

    • @jeanlasalle2351
      @jeanlasalle2351 11 месяцев назад +26

      However, always ensure that you remove the unnecessary french translations with "rm -fr /*"

  • @rebus_x5313
    @rebus_x5313 11 месяцев назад +58

    Unix engineers back in the day: Let's have a recursive rm -rf
    Also them: A single file tree that holds all the connected storage devices is a brilliant idea

    • @eMorphized
      @eMorphized 11 месяцев назад +6

      I'm pretty sure rm -rf exists because every bus location is on one tree. You don't want old files floating around on a single RAID drive

  • @somethingpeculiarthistime
    @somethingpeculiarthistime 11 месяцев назад +17

    These are so damn well made, nice work dude!

  • @dariusduesentrieb
    @dariusduesentrieb 11 месяцев назад +22

    You often can recover rm -rf data, though it is more likely to work on harddrives than on ssds. The first thing to do in such a case is to clone the entire disc using dd rescue. Then one can use proprietary tools to recover the deleted files. Though a good first start may be testdisk and photorec which are totally free.

    • @TimeLemur6
      @TimeLemur6 11 месяцев назад +5

      True, but it depends on how long the system's been running like that, and how much you care.

    • @kuroenekodemon
      @kuroenekodemon 9 месяцев назад

      So how to you recover it when you nuke root? Isn't the kernel completely destroyed after that?

    • @dariusduesentrieb
      @dariusduesentrieb 9 месяцев назад +1

      @@kuroenekodemonYou can boot another OS from a USB stick, and from there you use tools like photorec to recover files from the disk you deleted files from. The files are usually still there after deleting, because deleting doesn't overwrite them, it just removes the filesystem dictionary entry. But by looking at the bit patterns (e.g. typical for png, mp4, etc), often it is still possible to find these files, even if there isn't a dictionary entry anymore.

    • @microitos9754
      @microitos9754 18 дней назад +1

      @@dariusduesentrieb So how would one make files on linux nuked and completely unrecoverable?

    • @dariusduesentrieb
      @dariusduesentrieb 17 дней назад

      @@microitos9754 You overwrite them (often tools that format a drive also have the option of overwriting everything with 0s). Eventually this also happens naturally as you create new files.
      Alternatively you can throw a nuke on the disk.

  • @MikeePomsticks
    @MikeePomsticks Месяц назад

    Im picturing the one gif of the old guy dragging "my computer" into the recycling bin and deleting his entire pc

  • @NolenFelten
    @NolenFelten 11 месяцев назад +45

    A moment of silence for the data destroyed by this event.

    • @NightmareRex6
      @NightmareRex6 11 месяцев назад +2

      imagine whole games and mods that wont exist now becuase of it? and maby some youtubeseries as well.

    • @NolenFelten
      @NolenFelten 11 месяцев назад +2

      @NightmareRex6 I lost a lot of music
      and i still spend hours trying to find it again because of a fire. It's sad, man, like an old man that lost his wife.
      Accidentally lost an entire families photo collection when I was a stupid teenager trying to fix their computer.
      But that's their problem, not mine, I want my music back! Stuck my in my head with no track ID and I listen to mainly electronic music with no lyrics.

    • @nicholasvinen
      @nicholasvinen 11 месяцев назад

      F

  • @blinking_dodo
    @blinking_dodo 11 месяцев назад +22

    And that is why before you recursively delete things in a script, you check for an expected value present at that location!
    (A file named "this_is_the_steam_folder.txt" for example.)
    I always try to implement such sanity checks, just to be sure i don't rm-rf my home folder with all my precious files. (that i don't have a backup of! 😅)

    • @TARS..
      @TARS.. 11 месяцев назад +4

      Yeah I’m really paranoid about this, I’m constantly ls-ing and pwd-ing that it looks like I have short term memory

    • @maxxiong
      @maxxiong 11 месяцев назад +1

      ​@@TARS.. you realize you can see the pwd in the shell prompt right?
      Also I use zsh which asks me to confirm and usage of rm *

    • @TARS..
      @TARS.. 10 месяцев назад +3

      @@maxxiong oh no yeah I do, but ill still double check. Like I said I'm paranoid

  • @Steamrick
    @Steamrick 11 месяцев назад +91

    This is a perfect example of why you make backups and don't save them to the same machine you're backing up...

    • @isbestlizard
      @isbestlizard 11 месяцев назад +14

      Or a mountpoint, it could have been a network file system but mounted somewhere rm will happily destroy everything it can find XD

    • @TheAkashicTraveller
      @TheAkashicTraveller 11 месяцев назад +11

      @@isbestlizard This makes me think rm as it is just shouldn't exist.

    • @erikkonstas
      @erikkonstas 11 месяцев назад +5

      If you watch the video, it says that the backup *drive* was also wiped out...

    • @VictorRodriguez-zp2do
      @VictorRodriguez-zp2do 11 месяцев назад +21

      He backed it to another drive, the thing is the drive was mounted, likely on /media/, and since /media is inside of / it gets equally rekt

    • @Steamrick
      @Steamrick 11 месяцев назад +27

      @@erikkonstas A drive attached to the local machine via USB (or iSCSI mountpoint, I don't care) is still effectively local.
      Hence, don't backup up your data to a different drive on the same machine. If rm -rf doesn't get it, ransomware is another contender for 'where did my backup go'.

  • @rmidifferent8906
    @rmidifferent8906 8 месяцев назад +1

    I am a programmer. You accidentally explained to me something about bash that i did not know and i did not know i didn't know. You deserve a very spwcial cookie

  • @chrism3790
    @chrism3790 Месяц назад +1

    I write scripts in bash all the time and I would never EVER run rm -rf without checking the path first.
    Also, bash is crazy scary when running things as sudo. Basically like running around on ice, barefoot, with a kinfe in one hand and a loaded gun in the other. Whenever I find myself doing things like deleting entire directories, my alarms go off that maybe I shouldn't be writing this in bash in the first place.
    It's crazy to me how many stories I've heard about systems getting nuked like this, but rm still hasn't implemented a mechanism where "/" is allowed only if a special flag is provided

  • @TheMAZZTer
    @TheMAZZTer 11 месяцев назад +71

    Modern versions of the rm command now require a --no-preserve-root switch in order to allow you to use the command on / to prevent exactly this type of issue.
    Edit: Actually I think using a wildcard in /* bypasses this restriction which is why it didn't get caught!
    Valve doesn't know how to write Linux software? OK then I'll just go play with my Steam Deck now.

    • @bunny-cu9ni
      @bunny-cu9ni 11 месяцев назад +1

      That is not what no preserve root does

    • @erikkonstas
      @erikkonstas 11 месяцев назад +18

      ​@@bunny-cu9niThat's exactly what it does... problem is, the path was "/*", therefore the root directory was not a removal target, "only" everything inside it was... 😂

    • @erikkonstas
      @erikkonstas 11 месяцев назад

      I think I've only ever seen this on Ubuntu...

    • @Mitch-xo1rd
      @Mitch-xo1rd 11 месяцев назад +6

      ​@@erikkonstasNo bash is universal on linux. This script could have gotten any distro, especially at that time.

    • @erikkonstas
      @erikkonstas 11 месяцев назад

      @@Mitch-xo1rd Not all Linux distributions come with bash by default... also, I've arguably not tested hundreds, but Ubuntu was the only one which made me include --no-preserve-root (I obviously used it for mature purposes 😂).

  • @tecnotrecos1680
    @tecnotrecos1680 4 месяца назад +3

    Its also good to know that the rm command forces you to use the option --no-preserve-root in order to delete your hole file system

  • @DeusinMachina
    @DeusinMachina 11 месяцев назад +20

    So I think bash is good for simple things, but unfortunately doing anything other than running a few core utils gets complicated quick, and the edge cases in it makes you want to use a “proper” language. But unfortunately these scripts usually start out simple, but then organically gain more and more functionality until stuff like this happens. So I avoid writing bash scripts unless I know I won’t have to support the script long term. If I will, I use a different language

    • @retagainez
      @retagainez 11 месяцев назад

      Yeah, bash is good for simple use cases. Its okay for doing a task that's the size of a small unit: delete a specific file here, read some logs there, read a text file, etc. Deleting multiple files in a directory definitely sounds like one of those small units of work but it's actually a lot of work once it becomes recursive and can quickly get out of hand because of the edge cases which is something a simple one-liner command doesn't make obvious once you attach a two letter option to the end of it until after you ran it.
      Writing a simple Python script could've helped, or Ansible if there's a lot of separate but thorough steps to be taken and abstracted to work across numerous operating systems.

  • @Terensu-desu
    @Terensu-desu 11 месяцев назад +1

    I'm not sure what it is but hearing the Windows error prompt sound while looking at a Ubuntu GUI makes me chuckle every time. Can't wait for the next video in 9.9 years! Keep it up

  • @RemyJustice97
    @RemyJustice97 10 месяцев назад +1

    No joke this video taught me more about Linux than anything else I've come across. I'm a complete and utter novice with command lines, but this was incredibly digestible. Well done, thank you!

  • @ouroya
    @ouroya 11 месяцев назад +7

    glad to see one of my favorite bugs covered!!!

  • @oracle372
    @oracle372 11 месяцев назад +5

    Oh my god I cannot imagine the horror of losing that much data at once

  • @swaroopkunapuli1680
    @swaroopkunapuli1680 11 месяцев назад +3

    Lemmino "firecracker" at 3:45 was timed perfectly.

  • @adamantii
    @adamantii 11 месяцев назад +4

    This is one of my favorite channels, I love the topics and the presentation

  • @theunitax
    @theunitax 3 месяца назад +1

    Keyvin being "so cool and collected" is the best part of this video

  • @riddixdan5572
    @riddixdan5572 11 месяцев назад +11

    Awesome content, learned a lot and hoping for more in less than 10 years

  • @GRBtutorials
    @GRBtutorials 11 месяцев назад +4

    And this is why I use Timeshift to take regular file system snapshots (a backup would also work if it isn’t mounted and writable, but it’d take longer to restore). If something like that ever happens, it’s a matter of minutes to roll back.
    Of course, they’re not a substitute for backups, as they don’t protect against hardware (HDD/SSD) failure.

  • @Lurch-Bot
    @Lurch-Bot 11 месяцев назад +3

    Learned more new stuff about Linux and coding from watching this than from a dozen dedicated videos for Linux noobs.
    I recently learned how to load a Windows kernel from the GRUB command line, after I actually deleted the drive containing my Ubuntu installation (and boot menu) on my dual boot laptop. So instead, it boots to a Linux command line because it obviously can't find the missing bootloader. Reminded me of the good old days when I would boot into DOS and then manually start Win 9x from the command line. Except I didn't have to set a root or tell it which filesystem the drive used.

  • @Alex-jk2qy
    @Alex-jk2qy 11 месяцев назад +1

    Love the Lemmino vibe, this is such a great video! Amazing stuff, never seen anyone else do anything similar, keep it up!

  • @MisakaMikotoDesu
    @MisakaMikotoDesu 11 месяцев назад +18

    This is a great real world example of why you need offsite backups. I'm paying $3.6 a month for 1TB of storage in Germany. If you have the cash to spare it's well worth doing, even if you think it's never going to happen.
    Another good tip is to try backing stuff up from it just to test the backups. You don't wanna realize you forgot to include something when you actually need to go get it from backup.

    • @dothgaerwenoakblossom15
      @dothgaerwenoakblossom15 11 месяцев назад +4

      an untested backup is no backup

    • @hubertnnn
      @hubertnnn 11 месяцев назад +7

      Reminds me of my previous job.
      Something happened and I lost the entire code I was working on for the last 2 weeks.
      Luckily we had daily backups of our machines.
      After contacting the IT guy we found out that the backup did not include the folder with our work.

    • @J_Tangent
      @J_Tangent 11 месяцев назад

      ​@@hubertnnndamn, that really sucks

    • @mr.cauliflower3536
      @mr.cauliflower3536 11 месяцев назад

      You might just have two extra backup drives, which you switch every so often.This should be safe from getting rm rf

    • @MisakaMikotoDesu
      @MisakaMikotoDesu 11 месяцев назад

      ​@@mr.cauliflower3536 It is preferrable to use a home server or NAS, then you can use restic to backup files over SFTP, avoiding any and all issues where a rogue program deletes everything on your drives.
      Even a raspberry pi with a hard drive is a very good way to do local backups at home.

  • @CU.SpaceCowboy
    @CU.SpaceCowboy 11 месяцев назад +15

    you can also add an alias to your .profile/.bashrc/.zshrc for rm making it so it moves files to your trashbin or wtv instead of deleting. this way even if your comp crashes you can still recover most your files by mounting ssd/hd directly to another computer

    • @weakspirit_
      @weakspirit_ 11 месяцев назад +3

      this wouldn't work for keyvin's problem but still a great idea for users living in the terminal

    • @FengLengshun
      @FengLengshun 11 месяцев назад

      There's also rmtrash. The problem is of course that by default trash bin is pretty limited. Nevermind that it makes normal rm operations take so long, and the issues potentially caused by apps assuming rm IS rm.

    • @CU.SpaceCowboy
      @CU.SpaceCowboy 10 месяцев назад

      @@weakspirit_ steam could maybe chroot? hypothetically if they did chroot to a mounted drive, if there was a problem and the media unmounted would the script break? or continue running in a non chrooted env? idk, you kinda have to assume steam can handle there stuff its a pretty popular program

  • @tesla1772
    @tesla1772 11 месяцев назад +20

    Everything that could go wrong went wrong 😢

  • @bestcoolmanever
    @bestcoolmanever 11 месяцев назад +17

    2:05 I believe Windows also has symbolic links as well, though it wasn't very readily accessible until Windows 10 iirc since I think it was originally only enabled for kernel level applications
    Edit: As correctly pointed out, it's actually been a feature since Vista!

    • @ThePlayerOfGames
      @ThePlayerOfGames 11 месяцев назад +15

      Nah symlinks are available from wayyy back in Windows, you can use them to modify Paradox games whilst keeping your mods on a separate drive as far back as 7 at least. Pretty sure I've used them in Vista

    • @-x21-
      @-x21- 11 месяцев назад +10

      Symbolic links go back to Vista. Hardlinks and junctions go back to windows 2000.

    • @albingrahn5576
      @albingrahn5576 11 месяцев назад +2

      didn't know this, cool!

    • @-x21-
      @-x21- 11 месяцев назад

      @@albingrahn5576 "link shell extension" can help

    • @bestcoolmanever
      @bestcoolmanever 11 месяцев назад +1

      @-x21- I probably mixed up the dates, thanks for the correction

  • @Jackpkmn
    @Jackpkmn 11 месяцев назад +8

    If you must use rm -rf you must also ensure that whatever function you are building cant return in such a way that it runs on root. Or on the whole user folder.

  • @cooliostarstache6992
    @cooliostarstache6992 3 месяца назад

    THIS IS SUCH A GOOD VIDEO + subtitles??? This is awesome :O

  • @ShorkBoi
    @ShorkBoi 11 месяцев назад +4

    How a steam bug deleted someone's entire pc
    "sudo apt install steam"

  • @AshTronaut99
    @AshTronaut99 8 месяцев назад +6

    Ah yes. Writing a command any time you need to open anything at all.

  • @VulpineCortex
    @VulpineCortex 11 месяцев назад +4

    thanks for the vid, I've also learned some basics about linux file system along the way. Really informative, a great way to onboard anyone to IT basics

  • @staticbuilds7613
    @staticbuilds7613 2 месяца назад +1

    I feel like the scary ran the code by mistake and put that there to remember not to make the same mistake again but couldn't figure out, or didn't have enough time to fix it

  • @__christopher__
    @__christopher__ 11 месяцев назад +36

    While this was certainly a bad bug that shouldn't have happened, I also have to ask why that user had his backup disk mounted. A backup disk should be mounted only for two occasions: when you're making a backup and when you are restoring from backup.

    • @Ts6451
      @Ts6451 11 месяцев назад +23

      Perhaps he had backups of his Steam games from an older system on the drive, and was planning to restore them into the new installation of Steam once he got it configured and running?

    • @BrunodeSouzaLino
      @BrunodeSouzaLino 11 месяцев назад +1

      A lot of people use their backup disk as their scratch disk too instead of having a proper scratch disk. To me sounds more like the user moved to a Linux setup with a new PC but didn't want to or didn't have space to copy his games over the "backup" drive.

    • @hubertnnn
      @hubertnnn 11 месяцев назад +6

      Also if you have some automatic backup system then your backup drive is typically connected all the time.

    • @BrunodeSouzaLino
      @BrunodeSouzaLino 11 месяцев назад +1

      @@hubertnnn Yes, but usually you don't use it as a scratch drive or your server has drives which are used for that.

  • @meeskees702
    @meeskees702 11 месяцев назад +6

    Can’t wait to see more of this series!

  • @LethalChicken77
    @LethalChicken77 11 месяцев назад +18

    "Oopsie whoopsie just ran rm -rf *" X3

  • @orangejuice732
    @orangejuice732 11 месяцев назад +1

    I’m excited for this series, especially if it includes the flame wars that pop time to time on github issues threads.

  • @Rez07
    @Rez07 9 месяцев назад +1

    btw the music used in the video between 3:25 and 6:22 is named "LEMMiNO - Firecracker (BGM)", thank me later :D

  • @kangalio
    @kangalio 7 месяцев назад +7

    Shell as programming language was a mistake

  • @rodricbr
    @rodricbr 11 месяцев назад +3

    bruh, I loved how they added a "Scary!" commentary in the thing, hahahaha

  • @kinershah464
    @kinershah464 11 месяцев назад +4

    The issue is that script writers are usually too lazy to check for command outputs. Setting the flag at the top of the script to exit on any failure is one good way to avoid problems. Another thing is to add logs, but yeah since it deleted the everything the log file may get deleted as well.
    Anyways, interesting bug and quite scary indeed.

    • @alex_zetsu
      @alex_zetsu 11 месяцев назад

      I still don't get how the steamroot ended up empty string which caused the deletion

    • @bierrollerful
      @bierrollerful 11 месяцев назад +3

      @@alex_zetsu The command that should have returned the path to the steam root directory failed, so the variable $STEAMROOT was left as the default value, which is an empty string.

  • @ripplerxeon
    @ripplerxeon 11 месяцев назад +2

    I liked how you explained and Subbed Immediately. It tell me how much you have put a lot of effort into making one. Thank you for the video and would love , if the series continues.

  • @MKULTRA_Victim_
    @MKULTRA_Victim_ 10 месяцев назад

    It's incredible how you managed to make Linux command line so entertaining. Keep up the good work.

  • @pianissimo7121
    @pianissimo7121 11 месяцев назад +10

    can someone explain why there was a rm -rf command in the 1st place? even for reset steam command rm -rf seems too much no?

    • @ParkourGrip
      @ParkourGrip 11 месяцев назад +8

      What command would you use to delete the the steam directory? Wouldn't that command be susceptible to same problems as "rm -rf" anyway?

    • @comet.x
      @comet.x 11 месяцев назад

      ​​@@ParkourGrip mv into a temp to be removed later or gvfs-trash

  • @YHK_YT
    @YHK_YT 11 месяцев назад +44

    Minor inconvenience

    • @kormannn1
      @kormannn1 11 месяцев назад +4

      Minor programming mistake:

    • @superNova5837
      @superNova5837 3 месяца назад

      Tiny error

  • @Mark-xk3hh
    @Mark-xk3hh 11 месяцев назад +5

    Something similar happened to a game on windows (and linux, but I think it only occurred on windows) called Realm of the Mad God where uninstalling the launcher would delete the entire directory it was installed to. It was even worse cause uninstalling would give the UAC prompt which is pretty common for program uninstallers, so yeah... lol

    • @WaningLoon
      @WaningLoon 11 месяцев назад

      really? i don't remember that. i do remember the deltarune uninstaller deleting it's parent folder tho

    • @Mark-xk3hh
      @Mark-xk3hh 11 месяцев назад

      @@WaningLoon It was fixed really fast but there were people who unfortunately had it happen on Reddit

    • @chrisdawson1776
      @chrisdawson1776 11 месяцев назад

      You mean The Exalt Edition by DECA Games and yes, that was horrible I remember that a few years ago.

  • @Arcann_bhp
    @Arcann_bhp 11 месяцев назад +1

    knowing that the command runs anyways even after an error triggers is insane to me lmao, dude really put a try statement under a nuke button lmao

  • @gandalfgrey91
    @gandalfgrey91 8 месяцев назад +1

    It’s so simple to throw an exception there for an empty string, especially if you have the foresight to add “# scary!” Thats inexcusable lol

  • @xcloudx01alt
    @xcloudx01alt 11 месяцев назад +4

    Great explaination. Surprising there wasn't a sanity check to ensure the path is not blank before removing everything. Well, now they know 🤣

    • @Caffin8tor
      @Caffin8tor 11 месяцев назад

      Especially considering that there was a "scary" comment right above that! Someone realized this was a risky command and did nothing to make sure the variable is valid before running it!

  • @MyAmazingUsername
    @MyAmazingUsername 11 месяцев назад +10

    This code is astonishingly stupidly written. Everything about it is stupid. Literally nothing is redeemable. Everything from the logic, the commands and thought process of the engineer are all stupid. How did Valve approve it?

    • @jmanpolo5611
      @jmanpolo5611 6 месяцев назад +2

      Have you not once ever in your life made a production breaking mistake? Shit happens, humans are not omnipotent.. doesn't help that companies incentivize rushing through code with hard deadlines.

    • @MyAmazingUsername
      @MyAmazingUsername 6 месяцев назад +2

      @@jmanpolo5611 No, never anything like this. When it's time to rm -rf, you can be sure I check every piece of logic 15 times before I commit.

    • @jmanpolo5611
      @jmanpolo5611 6 месяцев назад +2

      @@MyAmazingUsername You can still check a piece of logic 15 times and miss something...

    • @MyAmazingUsername
      @MyAmazingUsername 6 месяцев назад

      @@jmanpolo5611 Nope. No way whatsoever that I would miss this. I would have shored up the path calculation and validation to perfection, because I'd be doing rm -rf on user machines.

    • @jmanpolo5611
      @jmanpolo5611 6 месяцев назад +3

      @@MyAmazingUsername I am not jus t talking about what you would or wouldn't miss. The point I am making is there are some things you obviously think about that others don't and that can also work in reverse, people think about seemingly obvious things you would also miss. The point I am making is people make silly mistakes all the time in this field and attacking someones intelligence for a mistake will inevitably come back to bite you when you find yourself in a similar situation. Was it the best decision? No. Could it have been avoided? Absolutely. Should we attack the engineer personally? No.
      If you work at a company and see a line of code that is a huge security flaw, you most definitely do not want to attack the writer themselves, instead you want to question it and get it resolved detached from the engineer. Otherwise everyone in the workplace will not enjoy working with you and then your job security is on the line if no one in the end is willing to vouch for you.

  • @kisaragi-hiu
    @kisaragi-hiu 11 месяцев назад +12

    Shell is a language that is surprisingly bad at paths considering its uses.

  • @РомаПетров-ж1н
    @РомаПетров-ж1н 9 месяцев назад +1

    Currently Steam is distributed is a Flatpak package. So I guess it should be confined in its own area and the damage it brings is quite limited by the environment itself.

  • @adjikuncorobhangun8063
    @adjikuncorobhangun8063 10 месяцев назад +2

    Love the classic explosion sound effect.mp3 as always 💻💥

  • @YordanIliev2002
    @YordanIliev2002 11 месяцев назад +5

    No, way, I was just rewatching the giltab video :D

  • @easternplatypus
    @easternplatypus 11 месяцев назад +14

    "# Scary!" 💀💀

  • @techmouse.
    @techmouse. 11 месяцев назад +6

    After reading through the comments, it's become clear most people completely missed the point. The issue isn't in how the variable was set. The issue is that the script used rm at all.
    There are commands that move files to the user's trash bin. This is much safer because it can be easily undone and there are so many checks built in.
    Don't use rm. Instead use something like gio trash.

    • @generalardi
      @generalardi 4 месяца назад

      The problem is that the trash bin is a concept provided by the desktop environment so there isn't necessarily a universal way to manage or access it, or it might not exist at all in some configurations.

    • @techmouse.
      @techmouse. 4 месяца назад

      @@generalardi What are you talking about? I already gave an example: gio trash
      It even works in KDE so it would probably work in all QT DEs. If it can use Steam, then it can use gio.

    • @lxdixd
      @lxdixd 3 месяца назад

      @@techmouse.what about those using wms like i3 that have no notion of a trashbin? or those running from a cmdline with just an x server? everything that’s not a shell posix coreutil should not be taken for granted

    • @techmouse.
      @techmouse. 3 месяца назад +2

      @@lxdixd Why would i3 prevent you from having a trash bin? You're probably not going to believe this, but I'm using i3 literally right now and I have a trash bin. Am I using i3 wrong?
      I just checked and _gio trash_ works in a TTY and SSH. Granted I didn't completely exit to the command line, but there's no reason it shouldn't work. You don't need to have any daemons running, so you can use it like any standalone command. If it's not installed on the system in question, then the standard approach should be used: Talk to the system admin.
      Sure _gio_ isn't a POSIX coreutil, but is Steam? You're saying you can use Steam and play games from a CLI running ONLY an x server? Do you see how ridiculous it sounds to dismiss _gio_ because it's not a coreutil, in the same environment you play games and run Steam in?
      Gio is not a coreutil so just keeping leaving rm in the hands of human error, right?

  • @Peeves22
    @Peeves22 11 месяцев назад +2

    Absolutely adoring the shaking variable/command substitutions!!

  • @3_14pie
    @3_14pie 11 месяцев назад +2

    Im impressed by how nobody but the guy who commented "scary" though rm rfing a variable directory could be a bad idea

  • @jdatlas4668
    @jdatlas4668 11 месяцев назад +23

    someone at steam had a *really* bad day because of this i’m sure lol

    • @stxnw
      @stxnw 11 месяцев назад +8

      It was not introduced by a Valve employee but by a Mechanical Engineering student from the University of Columbia.