Phew! I cancelled the 'sudo rm -rfv --no-preserve-root /' just in time!
-
So I wanted to see if the old 'rm -rf --no_preserve-root /' command actually deletes anything important (mostly so that I know how authentic jokes involving it are).
I opened my linux VirtualBox VM, made a snapshot, was smart enough to mark the shared folders as Read-Only, and started the delete.
I quickly found I had to add a -v to see it working and a 'sudo' prefix to get anything real done.Then after it deleted the /usr/bin stuff, I noticed it started deleting my shared folders anyway!
Luckily, I managed to stop it before (I hope) it got to deleting anything unrecoverable.I'm assuming the culprit here is VirtualBox which probably doesn't actually apply the shared folder changes until guest restart or something. (At least I'm hoping it's not the case that you can modify shared folders marked as Read-Only!)
So yeah, basically I managed to almost screw myself up with the ole' rm -rf command. Do I win anything?
-
@created_just_to_disl said:
was smart enough to mark the shared folders as Read-Only, and started the delete.
That's quite the buttumption.
-
possibly this: http://what.thedailywtf.com/badges/133/touched-in-the-head-by-an-angel
or maybe: http://what.thedailywtf.com/badges/129/i-m-a-special-snowflake
but i think that's at @pjh's discretion.
-
@created_just_to_disl said:
So yeah, basically I managed to almost screw myself up with the ole' rm -rf command. Do I win anything?
Why didn't you just clone the VHD and actually do it? Some things you just gotta experience, like writing a recursive self-spawner.
-
I would like to point out that one of the best things about using a GUI is having access to the "undo" command and being able to recover files from the recycle bin/trash can/whatever.
-
I would like to point out that one of the best things about using a GUI is having access to the "undo" command and being able to recover files from the recycle bin/trash can/whatever.
Irrelevant. rm has a "do you mean it?" option like Windows, and an equivalent to Windows' "don't even ask" shift+delete, and the latter's what he choose to use.
-
Irrelevant. rm has a "do you mean it?" option like Windows, and an equivalent to Windows' "don't even ask" shift+delete, and the latter's what he choose to use.
That's not even slightly equivalent. What about the case where I thought the command was correct (i.e. "yes I'm sure), but it had a typo or something and deleted the wrong files anyway? How do you recover from that?
Oh, right. You don't. You're just fucked. Fuck you, user. I am the OS who hates you. I hate all my users. Fuck you all.
-
What about the case where I thought the command was correct (i.e. "yes I'm sure), but it had a typo or something and deleted the wrong files anyway? How do you recover from that?
In exactly the same way you recover from an inadvertently comprehensive Shift-Delete on Windows: by restoring files from your backups.
-
What about the case where I thought the command was correct (i.e. "yes I'm sure), but it had a typo or something and deleted the wrong files anyway? How do you recover from that?
Oh, right. You don't. You're just fucked. Fuck you, user. I am the OS who hates you. I hate all my users. Fuck you all.
What about the case where you Shift+Delete the wrong files in Windows? How do you recover from that?
Oh, right. You don't. You're just fucked. Fuck you, user. I am the OS who hates you. I hate all my users. Fuck you all.
edit - damn you flabdablet for hanzoing me. it was even the very next post. I had a feeling that if I clicked the "1 reply" that would be what it said. oh well, double is fine.
-
What about the case where you Shift+Delete the wrong files in Windows?
The Recycle Bin is much more convenient to use thanrm -i
, though.
-
I would like to point out that one of the best things about using a GUI is having access to the "undo" command and being able to recover files from the recycle bin/trash can/whatever.
Except when the actual recycle bin and/or the restore utility are the things also being removed.
Which is the analogistic thing that's being attempted here
( This is more
rmdir c:\windows
, with predjudice, sort of thing, not highlightingc:\windows
in Explorer and hitting Del and expecting something/anything to actually happen..)
-
But that doesn't make a difference because
rmdir
is deprecated according to @blakeyrat.
And if you useRemove-Item -force
in Powershell you're an idiot, because that's a CLI and should not be used for removing files.
-
Well if you're trying to replicate a decades old (1986) urban legend to see what happens, you're not going to be using a GUI from last year to do it are ya? Windows 1.0 would appear to be the closest GUI at the time:
-
It's... beautiful...
-
It's... beautiful...
Vintage Windows is awesome, until you actually have to use it. I had to use File Manager just the other day, because they somehow wiped Explorer off a Win2000 server. I was surprised to learn this thing still exists on NT systems.
-
I dunno, I remember that Explorer annoyed the shit out of me when it came out. I would have preferred them to keep developing File Manager.
Filed under: please excuse me, my rose-tinted glasses are fogging up
-
Why didn't you just clone the VHD and actually do it?
Because shared folders. They aren't in the VHD, they're part of the host fs that is mounted inside the VM.
I would have unmounted them rather than take that kind of risk.
-
Awesome link. It renders everything that's ever been written on TDWTF pale and insipid by comparison. Imagine trying to find someone onsite who knew assembler nowadays.
-
Imagine trying to find someone onsite who knew assembler nowadays.
Nothing a bit of Googling can't do nowadays...
-
How are you marking this read only?
If it's just a file system attribute (on either Windows or Linux), then:
- sudo makes the command run as root, who can manipulate any file regardless of FS permissions.
- The -f (or force) argument will make rm suppress any warnings that you're trying to delete a read-only file.
-
The read only thing stopped protecting your files from you when you used sudo. That gave you root permission and in Linux, root can do everything.
-
Not if you're using AFS. With AFS, you've got to have the right crypto-token to access the file, even if you are root. We deploy this on our web server so that break-ins can't go off and change everything. Or even anything at all in fact; the web server (and anything that inherits from it) can't write anything at all since it doesn't have write permissions.
Which is a neat trick. Heavyweight as heck though.
-
It's like the Windows Metro stuff in 8-bit color!
-
It's like the Windows Metro stuff in 8-bit color!
Actually that's probably 4-bit color based on the title bar dithering.
-
It's like the Windows Metro stuff in 8-bit color!
It just needs some chiptune burbling for the welcome sound…
-
It just needs some chiptune burbling for the welcome sound…
You've got to be kidding! On PC speaker?
-
-
Oh, I know it can be done. Question is: why on earth would you want to?
-
Neat, didn't know about that. I knew about PAM and SELinux, but AFAIK root can just flip those off and do his/her thing regardless.
-
why on earth would you want to?
Back when that was the only sound you knew would be there, there was a huge incentive to do so. And there were programmers who knew how to do it; it was a technique that was also needed on the original ZX Spectrum, where the “chip” in chiptune would have been the Z80…
-
I know they were still shipping the program manager (progman.exe) at least up to windows 98. Not sure if I ever checked later versions.
-
it was a technique that was also needed on the original ZX Spectrum, where the “chip” in chiptune would have been the Z80…
Dude, I was there.
The point is that pretty much everyone had superior sound-generation hardware to PC speaker - which was just about suited to let you know that your graphics card had died.
My MSX had an AY-3-8910 sound generator (as did a host of other contemporary computers), which blew the PC speaker out of the water, despite being nowhere near championship standard. The Commodore 64 had the SID, which actually could be (and was) used for 'proper' music. The Amiga 500's Paula chip supported 4 channels of 8-bit PCM, which meant you could technically use it for digital recording.
The fun thing about chiptunes is that the (unaugmented) PC was the one computer you wouldn't use to make'em.
-
The Commodore 64 had the SID, which actually could be (and was) used for 'proper' music.
The SID chip is God. God of 8-bit music. Bow before it.
-
The SID chip is God. God of 8-bit music. Bow before it.
Note to self: finally get an assembly cart. Also, get rid of that nasty 60Hz buzz from my monitor.
The thing is awesome and super-easy to program, but actually making it do the sound you want it to is kind of a tricky business.
-
I prefer the YM2203, though.
But that one sounds very different than the SID.
-
A general point - Shift delete still prompts 'Are you SURE'
Is there a way to bypass that from the GUI with shift delete?
-
WTF is that smile supposed to be? Because it sure as fuck isn't a grin.
-
Perhaps they got it mixed up with ?
-
Really, grin and grinning.
REALLY?
. . .
-
wat
-
The first two look like "I'm chewing on a brick". Middle one is "OMG I'm chewing on a brick".
Last one is obviously happy to got rid of it.
-
@op
Why would you run that command on a VM that has ANY type of link to ANY of your main OS? Just install ubuntu server or linux mint or debian or whatever, allocate a bare bones 3gb, and test. NEVER execute said commands even on sonething that should theoretically be harmless.
-
I just tried it as well (Just change an existing shared folder to read only and delete files, not the whole
rm -rf
thingy) and it warned me that modifying shared folder settings while the actual folder is mounted may result in unexpected errors. It did not result in any errors, but I too could delete files. unmount + remount did not help, unload vboxsf kernel module and reload it did not help either, only powering the VM down and up again helped.Given that result, I'm not even sure if deleting the shared folders would have helped if still mounted. But as (until now) I only ever added shared folders at runtime and never deleted them, I never noticed this weird behaviour.
-
Last one is obviously happy to got rid of it.
And to complete the circle, is what it looks like after it shit out the brick.