When they say "Run rm -rf /*"

Поделиться
HTML-код
  • Опубликовано: 15 ноя 2024
  • Make backups!
    To remove directory named '-f' use this: rm -r ./-f
    In this video Web User struggles to remove a Linux directory named -f. He asks for help on a Discord server. BIG CAT trolls him by telling to run the command, which remove all files on the computer. Web User did it and instantly regretted doing this. He asks hakcer for help, and he recovers his files using photorec tool. Hakcer looked through the recovered files and was kind of shoked.

Комментарии • 291

  • @Reavenk
    @Reavenk 2 года назад +1073

    When Pixar was making ToyStory 2, legend has it that an errant command line wiped all of the movie assets and almost deleted the entire production of the movie. Then they realized a stay-at-home mom had a local backup at her house, and after restoring it they only lost 2 weeks of work instead of everything.

    • @Virbox
      @Virbox  2 года назад +110

      Wow, I didn't know that

    • @cafebean
      @cafebean 2 года назад +29

      only two weeks

    • @ViewerEm
      @ViewerEm 2 года назад +60

      @@cafebean compared to everything though

    • @asdfssdfghgdfy5940
      @asdfssdfghgdfy5940 2 года назад +63

      Wtf why wouldn't a studio of that size be running multiple NAS's

    • @Lin_The_Cat_
      @Lin_The_Cat_ 2 года назад +90

      Yep! In one of the later Toy Story movies, there's a scene where a car has a license plate and the plate ID is 'rm -rf /'

  • @ΚωνσταντίνοςΟυρούμης
    @ΚωνσταντίνοςΟυρούμης 2 года назад +1050

    If I had a coin for every time I have made a backup, I'd have zero coins.
    If I had a coin for every time I needed a backup, I'd have 5 coins 💀

    • @Virbox
      @Virbox  2 года назад +59

      Haha true story 😄

    • @chinh4thepro
      @chinh4thepro 2 года назад +2

      id have atleast 15

    • @wsketchy
      @wsketchy 2 года назад +7

      t...timeshift....? timeshift anyone..?!

    • @그냥사람-e9f
      @그냥사람-e9f 2 года назад +6

      If I had a penny for every time I made a backup, I'd have like 30
      If I had a penny for every time I needed a backup and were able to use one, I'd have 3 cent 🗿

    • @ΚωνσταντίνοςΟυρούμης
      @ΚωνσταντίνοςΟυρούμης 2 года назад +1

      Black air force energy

  • @mathgeniuszach
    @mathgeniuszach 2 года назад +327

    You could also just use "--".
    In other words: "rm -r -- -f"
    "--" tells the command parser to stop professing flags and treat everything else as arguments.

    • @PanDiaxik
      @PanDiaxik 2 года назад +59

      Or rm ./-f

    • @zlorf_youtube
      @zlorf_youtube 2 года назад +9

      Ohhh cool. Nice to know. Thanks

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 Год назад +7

      All the quotation marks and backslashes make no difference because they are being interpreted by the shell, and this is not a shell problem: it’s a problem with the behaviour of the command itself, that (normally) every word beginning with “-” is treated as an option, not a filename.
      The “./” prefix works in this case because rm is looking for file names. It wouldn’t work with other commands where the arguments are not file names.
      This is why the “--” convention was introduced, and is respected by many commands: it says “everything after this is an argument of some kind, not an option”.

    • @pallas1634
      @pallas1634 Год назад

      Or rm -r '-f', I thought that it worked because of (single quotes). Sorry.

    • @mathgeniuszach
      @mathgeniuszach Год назад +2

      @@pallas1634 Unless you're using some strange version of Linux, that command does not work.

  • @someonestolemyname
    @someonestolemyname 2 года назад +278

    Things you shouldn't do
    - run shell as root
    - running stranger's code without checking what it does especially as root
    - not backing up your data
    - using rm without safeguard especially with -r and -f flags
    - not using gio trash, trashcli or other trash utilities which you can recover from

    • @mrbanana6464
      @mrbanana6464 2 года назад +13

      Interactive flags for rm gives you alarm fatigue and makes you less likely to double check what you’re deleting

    • @ChimeraX0401
      @ChimeraX0401 2 года назад +5

      and not making snapshots so that you can just revert back when you broke your system

    • @zackattack9228
      @zackattack9228 2 года назад

      I am broke bro, I can't do backups

    • @sleaf6
      @sleaf6 2 года назад

      I do all but one of these things

    • @character640p
      @character640p 2 года назад

      @@zackattack9228 Use Rar and telegram bro

  • @john_swanson
    @john_swanson 2 года назад +82

    change the world my final message goodbye

  • @сосковыйёрж
    @сосковыйёрж 2 года назад +245

    The thing is... If you do backups and the disk where the backups are stored is still mounted, sudo rm -rf /* gonna delete it too💀

    • @rotteegher39
      @rotteegher39 Год назад +9

      btrfs subvolumes are separtare from what is mounted and you can't delete them even with rm -rf

    • @erikkeever3504
      @erikkeever3504 Год назад +11

      3-2-1: three copies total (including working), in two locations, one of which is off site.

    • @ruslansanzharov5825
      @ruslansanzharov5825 Год назад +9

      Normally backups are mounted in read-only mode to prevent abuses like this

    • @josephwhittaker2065
      @josephwhittaker2065 5 месяцев назад +2

      Offsite backups ftw

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

      @@erikkeever3504no, 1 other one is another format. Like 2 ssds and 1 hard drive etc.

  • @blank001
    @blank001 2 года назад +103

    You should always take your PC's backup and store it on the same PC it saves a lot of space
    Source: trust me brah

    • @louiesatterwhite3885
      @louiesatterwhite3885 2 года назад

      At least store it on a different drive than your system drive 💀

    • @user-xn3kt6bn5r
      @user-xn3kt6bn5r Год назад +4

      @@louiesatterwhite3885 nah brah just make new partition. Save loads of $$

  • @filipsr4452
    @filipsr4452 2 года назад +48

    rtfm :)
    POSIX.1-2008, volume "Base Definitions", section 12.1 "Utility Syntax Guidelines", item number 10: "The first -- argument that is not an option-argument should be accepted as a delimiter indicating the end of options. Any following arguments should be treated as operands, even if they begin with the '-' character."

    • @Virbox
      @Virbox  2 года назад +13

      bbut not all utilities are POSIX-compliant 🤓 (although GNU coreutils are)

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 Год назад +1

      I wrote a generic packup-blend utility to pack up a Blender document and automatically include its external dependencies in a single archive, with support for tar, zip and 7z formats. Of the three, only the zip command did not recognize “--” in any form.

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

      if it were me i'd rename/ move that folder then delete it. guy was playing with fire to begin with

  • @devrim-oguz
    @devrim-oguz Год назад +52

    The trash disappearing got me 😂

    • @link_team3855
      @link_team3855 4 месяца назад +1

      HE DELETED THE TRASH BIN! AAAAAAA

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

      A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN A BIN IN A BIN .

  • @Vienna3080
    @Vienna3080 Год назад +7

    He debloating Ubuntu

  • @aya-hl5bk
    @aya-hl5bk 2 года назад +80

    "Ok, lemme just LiveCD in" Funniest thing here

    • @godnyx117
      @godnyx117 Год назад

      *Cringest

    • @WolfyRed
      @WolfyRed Год назад

      @@godnyx117what?

    • @godnyx117
      @godnyx117 Год назад

      @@WolfyRed Did I stutter?

    • @WolfyRed
      @WolfyRed Год назад

      @@godnyx117 Fym? What is cringe about LiveCD

    • @godnyx117
      @godnyx117 Год назад

      @@WolfyRed Do you have a time machine?

  • @callisoncaffrey
    @callisoncaffrey 2 года назад +71

    The guy didn't like. The -f folder was gone, wasn't it?
    Edit: I meant "didn't lie" obviously.

    • @callisoncaffrey
      @callisoncaffrey Год назад +1

      @@monad_tcp I'm not. I'm using OpenBSD. Also you know there are other distros than suicide linux, right?

    • @WolfyRed
      @WolfyRed Год назад

      @@callisoncaffreywhat Tf is "suicide Linux"?

    • @callisoncaffrey
      @callisoncaffrey Год назад

      @@WolfyRed You type one command wrong and it deletes your hard drive. Can't recommend.

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

      @@callisoncaffrey same thing can happen in windows, there's a reason why there is administrator's code of conduct.

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

      @@fltfathin What? Please state what you impression of me is.

  • @horsepowermultimedia
    @horsepowermultimedia Год назад +20

    Sudo rm -rf /* is the System32 deletion of Linux.

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

      more like deletion of / (hidden root folder in windows) that includes all partitions

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

      Its more like deleting the the whole C drive and all other drives that are attached

  • @godnyx117
    @godnyx117 Год назад +27

    The first part, gave me PTSD!!!! I once had a file in my home directory called "~".
    GUESS what command I run to remove it!!!

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

      Damn😂😂

    • @yusinwu
      @yusinwu 3 месяца назад +7

      Self-initiated homelessfication protocol

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

      as a non bash user... please show me what command did you run

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

      @@lukasjetu9776 I was inside my home directory and I run: `rm ~`

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

      @@godnyx117 what all did it delete?

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

    I actually had this happen on a real production IT system that I was working towards taking over the management of. I was working for an outsourcing company, and the system was in production and being operated and managed by the application vendor.
    The reason we hadn't taken it over was because there was zero operational documentation and zero scripted operations. So the vendor was operating it manually based on instructions scribbled on a scrap of paper.
    These instructions said: 1. "cd /tmp"; 2. "rm -yr *"; 3. "reboot".
    Unfortunately, one evening having done step one, the operator received a telephone support call and as part of answering that he went root (presumably with "sudo -i" which put him back in the root directory). When he finished the call he executed steps 2 and 3 without exiting root thus doing EXACTLY what this video shows.
    D'UH!!!
    To cap it all, it then turned out that the system backups hadn't been working either and hadn't been tested and it took them 2 or 3 weeks to rebuild this production system. DOUBLE D'UH!!!!!!
    I might add that this was one of two similar screw ups (the other resulting from deletion of the production SQL database) at the end of a disastrous fixed price application development where the system has already been rejected and redeveloped from scratch and where the initial go live was abandoned twice, once because an untested system timezone change caused it to fail, and once because the system has never been tested on a production sized database, and several missing indexes resulted in use response times on a linked production customer call healing system going from 1sec to over 30mins.
    Put simply a fiasco from start to finish from a MAJOR MAJOR software house.

  • @etaashmathamsetty7399
    @etaashmathamsetty7399 2 года назад +23

    Finally beluga but it's a Linux channel
    U deserve more subs

    • @LinuxPlayer9
      @LinuxPlayer9 2 года назад +1

      That's what my brother has been saying

  • @martinhorner642
    @martinhorner642 2 года назад +8

    I didn't believe it was that hard to quote '-f' to rm as it was shown in the video. So I wrote a program to create an actual '-f'. Now I have to rm -rf /*

    • @GSBarlev
      @GSBarlev Год назад

      I can't believe I'm saying this, but can't you just open a GUI file explorer and delete it from there?
      This actually happened to me a few weeks ago, but it was ".." and not "-f"
      My solution was to use python pathlib:
      >>> from pathlib import Path
      >>> files = Path(".").glob("*")
      (eyeball to identify the cursed file)
      >>> cursed_file.unlink()

    • @sylv512
      @sylv512 Год назад +1

      all you have to do is “rm -rf -- '-f'”

  • @AgentPothead
    @AgentPothead 2 года назад +6

    LMAO that Ducktales moon theme song hit out of no where.

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

    Me: Sees rm -rf knowing that's the linux equivalent of del
    Also me: Noticing it ends in /*
    In other words, running rm -rf /* deletes every system-accessible file and folder, bricking the OS.

  • @MikePainstill
    @MikePainstill 7 дней назад

    That " /* " makes all the difference in the system.
    So, wake up, Arch user, wake up and smell the upgrade bork.

  • @chri-k
    @chri-k 2 года назад +7

    would it be logical for rm -rf /.. to disintegrate everything connected to the system bus?

  • @govindsanal3092
    @govindsanal3092 2 года назад +4

    That’s one way to take out the trash

    • @dsihacks
      @dsihacks 2 года назад

      ba dum, tsss

  • @directx872
    @directx872 2 года назад +1

    rm -rf /* removes EVERYTHING so you effectively brick your system.

    • @directx872
      @directx872 2 года назад

      @@parkman29 want to test your luck?

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

      In 2016, on some machines with SystemD and UEFI, running "rm -rf /" or "rm -rf /*" could permanently hard-brick your machine since the filesystem containing the EFI firmware's configuration files, located at /sys/firmware/efi/efivars, was mounted read/write. They fixed this in 2017 by mounting them read-only.

  • @rea9lizer
    @rea9lizer 2 года назад

    It has been decades but Take off and land still gets me

  • @zitrax506
    @zitrax506 2 года назад +10

    it's blatantly realistic, great video 🐧🖤

  • @oneandonly_h4
    @oneandonly_h4 2 года назад +3

    Oh man I had that problem when I was first starting with Linux.

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

    The first thing the noob at the terminal does = "sudo rm -rf /*"

  • @UltraNyan
    @UltraNyan 2 года назад

    Photorec - vomits all your files into a big pile

  • @pam4962
    @pam4962 Год назад +1

    I really, really thought that I was watching Beluga for a sec lol

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

      I wanted to sub to some random due who had no content and found you, gongrats… I guess?

  • @georgewang5516
    @georgewang5516 2 года назад +3

    Thanks! Your video content is the safest and most useful

  • @3ndgamer28
    @3ndgamer28 2 года назад

    this command was run when toy story 2 was still being made but then some employee that worked there and had a backup of the files and everything was fine

  • @BurzowySzczurek
    @BurzowySzczurek Год назад +1

    Nice Beluga style video. Keep going!

  • @randomname2437
    @randomname2437 2 года назад +3

    Bless photorec

  • @spaceowl5957
    @spaceowl5957 2 года назад +1

    This was so emotional and inspirational

  • @danielbelmir0
    @danielbelmir0 2 года назад +1

    i'm using git a lot for my projects, i know i'm the only that uses my programs but that's still a lot of work so it's good to have repositories on the internet to backup and be able to clone and push changes from any computer.

    • @GSBarlev
      @GSBarlev Год назад +2

      You'd also be surprised at who is benefiting from your code being out there. I've gotten into Minecraft modding, and there is *zero* documentation for anything, especially when a new version's just been released and you're trying to stay compatible. Oftentimes I'll search github for an import of the specific class I'm needing to reference and learn the proper usage pattern from a random mod with twenty downloads.

  • @sargismartirosyan9946
    @sargismartirosyan9946 Год назад +2

    And that's the moment that he remembered that he have fucked up 💀

    • @sylv512
      @sylv512 Год назад

      are you referencing the homework folder 💀

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

      🤣🤣💀💀​@@sylv512

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

    this seems like a beluga clone

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

    rm -rf "-f" and you made it

  • @barneytf2
    @barneytf2 Год назад

    Beluga, but he uses Linux. And I like it

  • @Geitungur
    @Geitungur Год назад

    That bit at the end reminded me of a story I heard where some serial killer took his laptop to a PC shop because it broke and when they fixed it it turned on to his desktop. With a bunch of photos of his victims. :|

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

    my will to live when I started middle school

  • @FeinesFabi
    @FeinesFabi 2 года назад +13

    Send them this instead so they (most likely) cannot recover their data: 'dd if=/dev/random of=/dev/sda bs=4096'

    • @Virbox
      @Virbox  2 года назад +5

      a real villain 😈

    • @Noob-gb6bn
      @Noob-gb6bn Год назад

      What does this do?

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

      ​@@Noob-gb6bn It corrupts your disk with random gibberish.

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

      @@electric7487 aight thx, but how?

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

      @@Noob-gb6bn /dev/random outputs random when it's called. The "if" stands for Input File, and "if=/dev/random" means you're using /dev/random as the source of the data to be written. "of" stands for Output File, and "of=/dev/sda" means that the data is to be written to /dev/sda, the location of your hard drive's main partition.
      An alternative is "dd if=/dev/zero of=/dev/sda", which overwrites /dev/sda with zeros instead of random data.

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

    Oh shit I remember that when I did this exact command on a container on a wsl (before I moved to Linux) and it deleted the whole wsl but at the cost of apps shortcuts vanished.

  • @anywallsocket
    @anywallsocket 2 года назад +1

    Yfw you run >rm file * instead of >rm file* 💀

  • @dtkedtyjrtyj
    @dtkedtyjrtyj 2 года назад +12

    rm -- -f
    might work
    But I suspect it wont format in RUclips.

    • @Virbox
      @Virbox  2 года назад +1

      This is also correct

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

    i once used multiflasher or whatever it is called and flashed my data backup instead of my USB drive
    100 gb of "projects" down the drain

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

    Tha one windows user: Wait, my os is giving me errors

  • @sovietunion1989
    @sovietunion1989 Год назад

    Everyone who watches Toy Story 2 will remember this

  • @sofiaknyazeva
    @sofiaknyazeva Год назад

    --no-preserve-root has left the chat

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

    Technically it did delete it

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

    How do I restore the files?

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

      From your daily backup, of course.

  • @polocatfan
    @polocatfan 4 месяца назад +1

    situation like this happened to me in a discord server. there was an issue going on with a library and they recommended I manually upgraded it. When I did that my system got bricked and when I told them they acted like they never recommended it and told me off. Turns out they got incredibly pissed off that I reported a bug in their "PERFECT PROGRAM" or thought I was lying so they decided to "prank" me so they intentionally sabotaged my machine. Told them to go fuck themselves and right before I left I saw a message that basically said "oops you were right...". fuck that nonsense. fuck all linux developers.

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

      guild* 🤓🤓🤓

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

    you could just rm -r -- -f

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

    windows user moving to linux

  • @butlazgazempropan-butan11k87
    @butlazgazempropan-butan11k87 Месяц назад

    Its the "alt + f4" of linux

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

    Just like PDN admins, except they won't bother to restore

  • @ЛордКекер
    @ЛордКекер 21 день назад

    he said '-r -f', no '-rf'

  • @dadudeme
    @dadudeme Год назад

    I am familiar with this procedure. It is a pain to recover a whole windows system after writing rasbian over the first 2 gigs.

  • @TheGoblinoid666
    @TheGoblinoid666 2 года назад

    Once I had to do this to remove a kally linux instalation, and it worked.

  • @alfaalfa993
    @alfaalfa993 2 года назад +4

    Why does he keep so many low-res photos?

    • @sylv512
      @sylv512 Год назад

      that’s his homework folder
      always protect your homework folder

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

    Use this: --
    So it would be, rm -r -- -f

  • @Adam_Lyskawa
    @Adam_Lyskawa 2 года назад +9

    When you use clouds, you don't really need big backups. BTW, files you own end up owning you.

    • @character640p
      @character640p 2 года назад

      Bro, what clouds do you use?

    • @nothanks5531
      @nothanks5531 Год назад +1

      @@character640p guava ice geekbar

    • @character640p
      @character640p Год назад

      @@nothanks5531 what does it even mean?

  • @edwolt
    @edwolt Год назад

    Today I started running "rm -r /home" as root, I stopped it as soon as I see the mistake. I hope no important file was lost.

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

    Use btrfs and you can run rm -rf /* any time you want

  • @nikoszervo
    @nikoszervo Год назад

    I dont make backups, I upload everything on the internet!

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

    Nahh bro just told him to delete all files in root directory

  • @ch4n4o2
    @ch4n4o2 Год назад

    Who needs backups if you can just reinstall the system

  • @पिज्जा
    @पिज्जा 3 месяца назад

    The more terrible thing is mess up if and of in data duplicate command

  • @Bob-bl1ey
    @Bob-bl1ey 2 месяца назад

    You don't have to type sudo, if u r already logged in as root

  • @yuvalid4156
    @yuvalid4156 2 года назад +3

    How would you delete a folder named -f? Genuinely asking

    • @Virbox
      @Virbox  2 года назад +12

      Two options:
      1) rm -r ./-f
      2) rm -r -- -f

    • @warmike
      @warmike 2 года назад +2

      @@Virbox or you know just use the gui

    • @coffeedude
      @coffeedude 2 года назад +3

      @@warmike you can't if you are ssh-ing into a server

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 Год назад +1

      Pro tip: if you are deleting a directory you know/expect to be empty, use “rmdir”, not “rm -rf”. Because “rmdir” will fail with an error if in fact the directory is not empty.

  • @retzerR
    @retzerR Год назад

    I made a directory called -f, fix 2 ways
    1. GUI
    2. rm ./-f -r (without r it will complain about not being a file)

  • @RareScrap
    @RareScrap Год назад

    What a good ending!

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

    I have absoultly no idea wth this is about

  • @colour_bloo
    @colour_bloo Год назад

    Nooooooo - not LMMS...
    It's going to take forever to re-install all those plugins 😢

  • @supercellodude
    @supercellodude 2 года назад

    I wonder how many normal distros (using glibc and most programs dynamically linked) try to have at least statically linked core utilities like rm.
    'cuz, you know, once you delete glibc*.so*, rm might not be able to run anyways, but much of the system data would already be deleted

    • @monad_tcp
      @monad_tcp Год назад

      It's always able to run, because this is Linux, it memory maps the file then delete the reference to the inode and keep the inode until the program closes.
      Unlike windows, that will lazy load the executable and keep it both locked in the file system and memory mapped. The file system could technically unlink the record on the MIB, and keep the blocks loaded and memory mapped, so you can actually delete the file, but that's not how the DLL loader works. Which is incidentally why the system has to reboot for some updates, most of them are able to just be service restarts, but when it's kernel mode, they can't.
      You can close the file handles and delete things, which is even cool, as it's like pulling the rug from under the process, the process crashes after you delete the file, easy trick.
      I use it all the time, close the handles using process hacker and then delete files and watch programs cry and commit suppuku because their file handles became null. (some are able to deal with it, Explorer is one, which is good as it sometimes keep handles dangling locked)

  • @hairynamjari790
    @hairynamjari790 2 года назад

    Just run
    rm -r -- -r

  • @antifurploppa
    @antifurploppa Год назад

    i did that in my archiso and its boomed

  • @natywubet2175
    @natywubet2175 Год назад

    rm is depreciated, use shred instead

  • @m4rt_
    @m4rt_ Год назад

    no
    rm -r -f /* --no-preserve-root

  • @methanbreather
    @methanbreather Год назад

    you know - if your file system supports snapshots, it isnt that bad....

  • @rotteegher39
    @rotteegher39 Год назад

    That's why I use btrfs or zfs

  • @caiolaytynher5994
    @caiolaytynher5994 2 года назад

    Fun fact: I already deleted my home folder doing this

    • @edwolt
      @edwolt Год назад +1

      I almost did it today. I ran the command "rm -r /home" as root trying to delete another folder, I stopped it as soon I saw the mistake. I hope that I didn't lost any important file.

    • @caiolaytynher5994
      @caiolaytynher5994 Год назад

      @@edwolt in my case was a mistake with environment variables, I had a folder named $HOME (long history), tried to delete it and boom. What saved me was the protected files, I kept all the important things, but other stuff did got deleted, hehe.

  • @InfiniteCoder01
    @InfiniteCoder01 2 года назад

    Actually you need "rm -rf /* --no-preserve-root"

    • @sylv512
      @sylv512 Год назад

      distro-dependent, i think

  • @matthewlui1004
    @matthewlui1004 2 года назад

    A permission error you say, why not do
    sudo chown -R /

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

      I actually did that once back when I was still using my old laptop. I was trying to install something and it threw lots of "permission denied" errors. Since I didn't know much about the Linux filesystem and file permissions at the time, I foolishly ran "sudo chown [username] -R /*" in an attempt to "fix it". The result? sudo isn't working anymore ("sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set"), even pkexec errors out ("pkexec: must be setuid root"), and a lot of other programs throw errors. When I tried to reboot my system it would always hang before getting to the login screen.
      Turns out that sudo, ssh, sendmail, pkexec, the login binary, and many other applications require filesystem permissions checks in order to run safely since they would open up too many security holes otherwise. When I ran "chown" on my entire root directory, it compromised everything.
      The worst part about running any sort of chmod or chown recursively is that it's lossy and irreversible by nature, and doing on the root directory is especially dangerous. I ended up making a backup of my data and reinstalling Ubuntu over my home folder since it was too much hassle reverting everything back.

  • @EmoonX
    @EmoonX 2 года назад +1

    "[~user/]$ rm -rf /
    rm: it is dangerous to operate recursively on `/'
    rm: use --no-preserve-root to override this failsafe"
    At least they're nice about offering a second chance.

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

    Just rm "-f"

  • @philosophicalgamer2564
    @philosophicalgamer2564 2 года назад

    This should be an amine

  • @Pwnagotchi-0
    @Pwnagotchi-0 8 месяцев назад

    I could learn something from you guys

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

    silly little me did sudo chmod /* 000, worst mistake of my life.

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

    not another baluga

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

    Yea I ran it before in cmd and it broke my computer gpedit and regedit all gone😢

  • @WolvericCatkin
    @WolvericCatkin 2 года назад

    _r/technicallythetruth..._ 😹 It'd definitely get rid of the file you wanted to get rid of...

  • @mustangrt8866
    @mustangrt8866 Год назад

    just cp lib and src, rm rf the projects and make new projects folder

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

    If you want to have a clean filesystem you should create it new instead remove all the files. 😊

  • @NoobDeSupreme
    @NoobDeSupreme 2 года назад +8

    HAHAHA This is so true XD.

  • @Lucas-ky7dc
    @Lucas-ky7dc 2 года назад +3

    Wait, `rm -r \-f` wouldn't work?
    Well, guess I need to test that myself.

    • @Ґіґакозак
      @Ґіґакозак 2 года назад +2

      I guess it's maybe because of the backslash, linux uses the forward ones
      upd: yep, he wrote that in the description

    • @chri-k
      @chri-k 2 года назад

      @Watcher no, you escape the character “-“, which yields “-“, and so that backslash does absolutely nothing

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

    Put it in ""

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

    what dies rm -r ./-f do?

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

    ... is 'sudo rm -rf' the alt F4 of linux?

    • @Tom-uy4io
      @Tom-uy4io 3 месяца назад

      It's the delete C:\ of linux
      It deletes every single file on your drives, every single file on any USB drives attached.
      Even network drives get wiped.

  • @porrysecker69
    @porrysecker69 2 года назад +1

    Delete system32?