Whats your rm-rf story Sup Forums?

Whats your rm-rf story Sup Forums?

Other urls found in this thread:

snopes.com/horrors/freakish/window.asp
theregister.co.uk/2015/01/17/scary_code_of_the_week_steam_cleans_linux_pcs/
github.com/MrMEEE/bumblebee-Old-and-abbandoned/issues/123
twitter.com/NSFWRedditImage

Bump

I use it when I have to delete something recursively and force it.

...

>forgot to escape whitespace
>entire drive of data deleted
>all gone, like tears in rain

Don't drink and rm, kids.

I did a chmod 777 to / when i was first getting into linux

The other day I accidentally ran rm -rf /home/user. Entirely serious, I pressed enter too early and I'm the biggest retard alive. I pressed control c basically immediately, and the only stuff it had deleted was about 2 10gb torrents at ~/Torrents.

what happens when you do that?

I only rm -rf one level relative paths

i was trying to prepend a bunch of webm filenames with the contents of the title metadata, ended up turning about 80 of my ~1000 webms into 0 byte files. script worked on the rest of the files though

When you chmod 777 to /, ANYONE AND EVERYONE can read, modify, and execute any of the files on your system

Wanted to delete some directory, forgot I had mounted remote storage inside it. Luckily I had backups :^)

That's what I thought. Can't you just change the permissions back?

Yes. Yes you can. In the same way you can empty a pool with a spoon.

This Reinstall would be the best option is most cases. I certainly wouldn't want to unfuck such a fuck up.

I had a throw away debian install and I was thinking about switching anyway so I rm -rf / for kicks and giggles

>install gentoo
>nothing works
>spend 3 days installing gentoo
>nothing works
>dd if=/dev/zero of=/dev/sda
>install windows

I did that with 666, the system broke

>3 days to install Gentoo
It took me even less than 6h to install Gentoo the first time.
And 5 of those hours were spent configuring /etc/portage/make.conf in the process because I didn't know of /etc/portage/package_use at that time, so I read up what each USE flag does and included or excluded it globally.

I use it most often when i want to remove a cloned git repository.
I think red hat and bsds have repair permissions scripts.

Wouldn't this also break a lot of shit? I imagine lots if binaries/services won't run without being set to certain permissions. For example, OpenSSH won't run without having your home directory config set to 600

Brainlets

>Testing the security of something at work
> know its vulnerable from cve.
>Find allegedly working exploit
>Quickly look through it, mostly byte code looks like standard stuff, but really I'm just script kiddie'ing this
>fucking thing wipes out my home directory

Demoing that it'll fail without --no-preserve-root, it didn't…

Not so long ago I was playing with automatic mounting of sshfs and decided to delete the mount point. Forgot that the fs was still mounted and rm -rfed it. I lost a firefox profile folder and a txt file where I stored my music-to-download list.

snopes.com/horrors/freakish/window.asp

dd'd a livecd to sda.
Wondered why it took 7 seconds rather than 3 minutes over a USB 2.
The root was encryted, ain't getting anything back from that. Luckily I didn't need anything.

I run a ZFS root mirror on my equipment as an added safeguard against this form of stupidity now.

rm'd my gentoo's /bin directory. :(

had to steal the /bin from live USB gentoo lol

Thanks for the irony user.

Not rm -rf, but I had a shitload of files in this gigantic subfolder chain and I wanted to move all of them into the parent directory, so I threw together a bash script that I figured should work.
It didn't, and I thought "oh this is a permissions issue" and ran it as admin.

Except running it as admin ran it from the C:\Windows root folder and it started shifting a ton of random files out of their system folders.
Broke windows in a really comedic and interesting way.

>"Our advice is to apply the same rule to architecture as you do to computers: Don’t ever bet your life on windows not crashing."

rm -rf'd as a regular user and i got owned

>Whats your rm-rf story
Saw Sup Forums joke about it, googled it, learned not to ever do it. Also learned that it's important to learn what the CLI tools actually do, rather than just copy-pasting what you read on sites.

>accidents never happen

how you accidentally rm-rf /

theregister.co.uk/2015/01/17/scary_code_of_the_week_steam_cleans_linux_pcs/
github.com/MrMEEE/bumblebee-Old-and-abbandoned/issues/123

Sudo -i in conjunction with the abuse of tab-completion.

rm -rf OP

Killed my main partition using gparted back in ~2007 by targeting the wrong disk. I was so young and reckless. Lost a lot of important data and only recovered a small amount over a few days using photorec.

These days when I'm working in a partition editor I physically disconnect disks I'm not editing.

>told i'm fired in a week
>minutes before i leave, head goes to the bathroom
>alias git-pull=rm -rf
>leave

>late night
>manually backing up my code directory
>try to drag folder onto other drive
>errors
>delete old backup to try to fix errors
>turns out I had two of the same window open

> chown -R www-data:www-data / etc/nginx/somefile
On my webserver via ssh
Could not sudo anymore since sudo refuse to work if the sudoers file is not root's
Had to drive home to boot in single user mode

This thread gives me cold shivers. Remember to do regular offline backups kids.

>using OpenBSD
>time for an update
>decide to overwrite system partitions with updated version
>start install disk
>it suggests a complete overwrite as default
>want to exit installer to command line
>press C-d to exit
>installer thinks this means "go ahead"
>overwrite begins
>stop it with C-c
>too late
>lost everything, recoveries failed
>had enough of OpenBSD
>install gentoo

I once accidentally my movies and music. I was deleting mount points from /mnt and my media partition was still mounted.

What command did you run? sudo rmdir /mnt/* wouldn't have done this.

nice backup strategy bro