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.
@Virbox2 жыл бұрын
Wow, I didn't know that
@cafebean2 жыл бұрын
only two weeks
@ViewerEm2 жыл бұрын
@@cafebean compared to everything though
@asdfssdfghgdfy59402 жыл бұрын
Wtf why wouldn't a studio of that size be running multiple NAS's
@Lin_The_Cat_2 жыл бұрын
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 жыл бұрын
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 💀
@Virbox2 жыл бұрын
Haha true story 😄
@chinh4thepro2 жыл бұрын
id have atleast 15
@wsketchy2 жыл бұрын
t...timeshift....? timeshift anyone..?!
@그냥사람-e9f2 жыл бұрын
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 жыл бұрын
Black air force energy
@mathgeniuszach2 жыл бұрын
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.
@PanDiaxik2 жыл бұрын
Or rm ./-f
@zlorf_youtube2 жыл бұрын
Ohhh cool. Nice to know. Thanks
@lawrencedoliveiro9104 Жыл бұрын
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 Жыл бұрын
Or rm -r '-f', I thought that it worked because of (single quotes). Sorry.
@mathgeniuszach Жыл бұрын
@@pallas1634 Unless you're using some strange version of Linux, that command does not work.
@someonestolemyname2 жыл бұрын
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
@mrbanana64642 жыл бұрын
Interactive flags for rm gives you alarm fatigue and makes you less likely to double check what you’re deleting
@ChimeraX04012 жыл бұрын
and not making snapshots so that you can just revert back when you broke your system
@zackattack92282 жыл бұрын
I am broke bro, I can't do backups
@sleaf62 жыл бұрын
I do all but one of these things
@character640p2 жыл бұрын
@@zackattack9228 Use Rar and telegram bro
@john_swanson2 жыл бұрын
change the world my final message goodbye
@сосковыйёрж2 жыл бұрын
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💀
@rotteegher392 жыл бұрын
btrfs subvolumes are separtare from what is mounted and you can't delete them even with rm -rf
@erikkeever3504 Жыл бұрын
3-2-1: three copies total (including working), in two locations, one of which is off site.
@ruslansanzharov5825 Жыл бұрын
Normally backups are mounted in read-only mode to prevent abuses like this
@josephwhittaker20656 ай бұрын
Offsite backups ftw
@Tryh4rd3rr4 ай бұрын
@@erikkeever3504no, 1 other one is another format. Like 2 ssds and 1 hard drive etc.
@blank0012 жыл бұрын
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
@louiesatterwhite38852 жыл бұрын
At least store it on a different drive than your system drive 💀
@user-xn3kt6bn5r Жыл бұрын
@@louiesatterwhite3885 nah brah just make new partition. Save loads of $$
@devrim-oguz2 жыл бұрын
The trash disappearing got me 😂
@link_team38555 ай бұрын
HE DELETED THE TRASH BIN! AAAAAAA
@private8953 ай бұрын
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 .
@aya-hl5bk2 жыл бұрын
"Ok, lemme just LiveCD in" Funniest thing here
@godnyx117 Жыл бұрын
*Cringest
@WolfyRed Жыл бұрын
@@godnyx117what?
@godnyx117 Жыл бұрын
@@WolfyRed Did I stutter?
@WolfyRed Жыл бұрын
@@godnyx117 Fym? What is cringe about LiveCD
@godnyx117 Жыл бұрын
@@WolfyRed Do you have a time machine?
@callisoncaffrey2 жыл бұрын
The guy didn't like. The -f folder was gone, wasn't it? Edit: I meant "didn't lie" obviously.
@callisoncaffrey Жыл бұрын
@@monad_tcp I'm not. I'm using OpenBSD. Also you know there are other distros than suicide linux, right?
@WolfyRed Жыл бұрын
@@callisoncaffreywhat Tf is "suicide Linux"?
@callisoncaffrey Жыл бұрын
@@WolfyRed You type one command wrong and it deletes your hard drive. Can't recommend.
@fltfathin4 ай бұрын
@@callisoncaffrey same thing can happen in windows, there's a reason why there is administrator's code of conduct.
@callisoncaffrey4 ай бұрын
@@fltfathin What? Please state what you impression of me is.
@filipsr44522 жыл бұрын
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."
@Virbox2 жыл бұрын
bbut not all utilities are POSIX-compliant 🤓 (although GNU coreutils are)
@lawrencedoliveiro9104 Жыл бұрын
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.
@fltfathin4 ай бұрын
if it were me i'd rename/ move that folder then delete it. guy was playing with fire to begin with
@etaashmathamsetty73992 жыл бұрын
Finally beluga but it's a Linux channel U deserve more subs
@LinuxPlayer92 жыл бұрын
That's what my brother has been saying
@godnyx117 Жыл бұрын
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_trav9 ай бұрын
Damn😂😂
@yusinwu4 ай бұрын
Self-initiated homelessfication protocol
@lukasjetu9776Ай бұрын
as a non bash user... please show me what command did you run
@godnyx117Ай бұрын
@@lukasjetu9776 I was inside my home directory and I run: `rm ~`
@lukasjetu9776Ай бұрын
@@godnyx117 what all did it delete?
@ihavenoideadanny28 күн бұрын
this is a rm -rf "$STEAMROOT/"* type of moment
@Vienna3080 Жыл бұрын
He debloating Ubuntu
@SodalisUK5 ай бұрын
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.
@horsepowermultimedia Жыл бұрын
Sudo rm -rf /* is the System32 deletion of Linux.
@_kitaes_5 ай бұрын
more like deletion of / (hidden root folder in windows) that includes all partitions
@fluoriteByte3 ай бұрын
Its more like deleting the the whole C drive and all other drives that are attached
@AgentPothead2 жыл бұрын
LMAO that Ducktales moon theme song hit out of no where.
@martinhorner6422 жыл бұрын
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 /*
@GSBarlev2 жыл бұрын
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 Жыл бұрын
all you have to do is “rm -rf -- '-f'”
@BurzowySzczurek Жыл бұрын
Nice Beluga style video. Keep going!
@georgewang55162 жыл бұрын
Thanks! Your video content is the safest and most useful
@govindsanal30922 жыл бұрын
That’s one way to take out the trash
@dsihacks2 жыл бұрын
ba dum, tsss
@andreasjoannai64413 ай бұрын
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.
@zitrax5062 жыл бұрын
it's blatantly realistic, great video 🐧🖤
@spaceowl59572 жыл бұрын
This was so emotional and inspirational
@rea9lizer2 жыл бұрын
It has been decades but Take off and land still gets me
@3ndgamer282 жыл бұрын
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
@randomname24372 жыл бұрын
Bless photorec
@chri-k2 жыл бұрын
would it be logical for rm -rf /.. to disintegrate everything connected to the system bus?
@MikePainstillАй бұрын
That " /* " makes all the difference in the system. So, wake up, Arch user, wake up and smell the upgrade bork.
@UltraNyan2 жыл бұрын
Photorec - vomits all your files into a big pile
@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. :|
@pam4962 Жыл бұрын
I really, really thought that I was watching Beluga for a sec lol
@aarnealplayzgames95804 ай бұрын
I wanted to sub to some random due who had no content and found you, gongrats… I guess?
@oneandonly_h42 жыл бұрын
Oh man I had that problem when I was first starting with Linux.
@directx8722 жыл бұрын
rm -rf /* removes EVERYTHING so you effectively brick your system.
@directx8722 жыл бұрын
@@parkman29 want to test your luck?
@electric7487 Жыл бұрын
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.
@Sh0071n64 ай бұрын
The first thing the noob at the terminal does = "sudo rm -rf /*"
@nxx998 ай бұрын
my will to live when I started middle school
@danielbelmir02 жыл бұрын
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.
@GSBarlev2 жыл бұрын
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.
@SNSISNSJISEJSJS Жыл бұрын
And that's the moment that he remembered that he have fucked up 💀
@sylv512 Жыл бұрын
are you referencing the homework folder 💀
@SNSISNSJISEJSJS4 ай бұрын
🤣🤣💀💀@@sylv512
@FeinesFabi2 жыл бұрын
Send them this instead so they (most likely) cannot recover their data: 'dd if=/dev/random of=/dev/sda bs=4096'
@Virbox2 жыл бұрын
a real villain 😈
@Noob-gb6bn Жыл бұрын
What does this do?
@electric7487 Жыл бұрын
@@Noob-gb6bn It corrupts your disk with random gibberish.
@Noob-gb6bn Жыл бұрын
@@electric7487 aight thx, but how?
@electric7487 Жыл бұрын
@@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. If /dev/sda is the location of your hard drive's main partition, you will corrupt your install and will force a format and reinstallation. An alternative is "dd if=/dev/zero of=/dev/sda", which overwrites /dev/sda with zeros instead of random data.
@markusTegelaneАй бұрын
To be fair, this will eventually remove the `-f` directory
@BloomDevelop3 ай бұрын
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.
@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.
@barneytf2 Жыл бұрын
Beluga, but he uses Linux. And I like it
@ridndev_5 ай бұрын
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
@anywallsocket2 жыл бұрын
Yfw you run >rm file * instead of >rm file* 💀
@edwolt2 жыл бұрын
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.
@dtkedtyjrtyj2 жыл бұрын
rm -- -f might work But I suspect it wont format in KZbin.
@Virbox2 жыл бұрын
This is also correct
@RareScrap Жыл бұрын
What a good ending!
@alfaalfa9932 жыл бұрын
Why does he keep so many low-res photos?
@sylv512 Жыл бұрын
that’s his homework folder always protect your homework folder
@supercellodude2 жыл бұрын
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 Жыл бұрын
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)
@sovietunion1989 Жыл бұрын
Everyone who watches Toy Story 2 will remember this
@ZE_R0GT4 ай бұрын
this seems like a beluga clone
@naaaaaaaaathan3 ай бұрын
rm -rf "-f" and you made it
@sofiaknyazeva2 жыл бұрын
--no-preserve-root has left the chat
@TheGoblinoid6662 жыл бұрын
Once I had to do this to remove a kally linux instalation, and it worked.
@commandcracker424 ай бұрын
Use btrfs and you can run rm -rf /* any time you want
@yeshwantkota2304 ай бұрын
Tha one windows user: Wait, my os is giving me errors
@Bob-bl1ey4 ай бұрын
You don't have to type sudo, if u r already logged in as root
@IceoziАй бұрын
Tip: Whenever running a Linux command, make sure to make a backup before doing it!
@yuvalid41562 жыл бұрын
How would you delete a folder named -f? Genuinely asking
@Virbox2 жыл бұрын
Two options: 1) rm -r ./-f 2) rm -r -- -f
@warmike2 жыл бұрын
@@Virbox or you know just use the gui
@coffeedude2 жыл бұрын
@@warmike you can't if you are ssh-ing into a server
@lawrencedoliveiro9104 Жыл бұрын
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.
@StrivingArrow Жыл бұрын
How do I restore the files?
@electric74879 ай бұрын
From your daily backup, of course.
@polocatfan6 ай бұрын
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.
@seekyboi234 ай бұрын
guild* 🤓🤓🤓
@Adam_Lyskawa2 жыл бұрын
When you use clouds, you don't really need big backups. BTW, files you own end up owning you.
@character640p2 жыл бұрын
Bro, what clouds do you use?
@nothanks5531 Жыл бұрын
@@character640p guava ice geekbar
@character640p Жыл бұрын
@@nothanks5531 what does it even mean?
@Paddy_12453 ай бұрын
Yea I ran it before in cmd and it broke my computer gpedit and regedit all gone😢
@colour_bloo Жыл бұрын
Nooooooo - not LMMS... It's going to take forever to re-install all those plugins 😢
@toster99605 ай бұрын
you could just rm -r -- -f
@पिज्जा4 ай бұрын
The more terrible thing is mess up if and of in data duplicate command
@antifurploppa Жыл бұрын
i did that in my archiso and its boomed
@Maruchipawa4 ай бұрын
I have absoultly no idea wth this is about
@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)
@nikoszervo Жыл бұрын
I dont make backups, I upload everything on the internet!
@butlazgazempropan-butan11k872 ай бұрын
Its the "alt + f4" of linux
@matthewlui10042 жыл бұрын
A permission error you say, why not do sudo chown -R /
@electric7487 Жыл бұрын
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.
@KangJangkrik4 ай бұрын
Just like PDN admins, except they won't bother to restore
@hairynamjari7902 жыл бұрын
Just run rm -r -- -r
@gdplayer103510 ай бұрын
windows user moving to linux
@Pwnagotchi-09 ай бұрын
I could learn something from you guys
@Plumjet094 ай бұрын
Technically it did delete it
@AnimeZNT_153 ай бұрын
Nahh bro just told him to delete all files in root directory
@calculator_gaming4 ай бұрын
what dies rm -r ./-f do?
@ЛордКекерАй бұрын
he said '-r -f', no '-rf'
@rotteegher392 жыл бұрын
That's why I use btrfs or zfs
@ch4n4o2 Жыл бұрын
Who needs backups if you can just reinstall the system
@methanbreather2 жыл бұрын
you know - if your file system supports snapshots, it isnt that bad....
@Lucas-ky7dc2 жыл бұрын
Wait, `rm -r \-f` wouldn't work? Well, guess I need to test that myself.
@jakdziala2 жыл бұрын
I guess it's maybe because of the backslash, linux uses the forward ones upd: yep, he wrote that in the description
@chri-k2 жыл бұрын
@Watcher no, you escape the character “-“, which yields “-“, and so that backslash does absolutely nothing
@natywubet2175 Жыл бұрын
rm is depreciated, use shred instead
@craftrumzen2393 Жыл бұрын
What about 'rm -r ~./-f' ?
@philosophicalgamer25642 жыл бұрын
This should be an amine
@kokodi014 ай бұрын
silly little me did sudo chmod /* 000, worst mistake of my life.
@m4rt_2 жыл бұрын
no rm -r -f /* --no-preserve-root
@mustangrt8866 Жыл бұрын
just cp lib and src, rm rf the projects and make new projects folder
@InfiniteCoder012 жыл бұрын
Actually you need "rm -rf /* --no-preserve-root"
@sylv512 Жыл бұрын
distro-dependent, i think
@NoobDeSupreme2 жыл бұрын
HAHAHA This is so true XD.
@link_team38555 ай бұрын
... is 'sudo rm -rf' the alt F4 of linux?
@Tom-uy4io4 ай бұрын
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.
@leo_craft14 ай бұрын
Just rm "-f"
@surplus2720 Жыл бұрын
My braaaaaaaaaaaaaaain is in buffer overflow help me plis
@EmoonX2 жыл бұрын
"[~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.