News for hackers. Stuff that matters.
Re:Suicide Linux by lloeki on Thursday October 26, 2017 @06:20PM (#15563710)
> The reaction from the OS is actually rather underwhelming.

Somehow related, a coworker at a previous place unmounted some disks on an old AIX production box. It took him a solid minute to realise he had mistakenly unmounted / due to a typo (yes it was possible) as old processes with already opened files were happily serving stuff and only new attempts at opening files were beginning to produce errors.

Also, a similar interactive mishap in the heat of the action:

    somebox:~$ rm * .o
    rm: .o: No such file or directory
    somebox:~$ # ...
    somebox:~$ # *stares a prompt*
    somebox:~$ # Wait, what? _Please_ tell me those C files were versioned! (The answer was, obviously, "no")
Re:Suicide Linux by omginternets on Friday October 27, 2017 @06:48AM (#15567183)
Reminds me of this hilarious GitHub issue: https://github.com/MrMEEE/bumblebee-Old-and-abbandoned/issue...

(Hilarious and unnerving)

Re:Suicide Linux by tech2 on Friday October 27, 2017 @04:51AM (#15566724)
Within the first year or so of having installed Linux (mid-90's), I made the mistake of accidentally deleting /etc (wrote a script to tidy /tmp at boot, but it hadn't cd'd correctly).

That was possibly the best unix/linux learning experience of my life. Rebuilding /etc sufficient to rescue my files I cared about before a reinstall. Rescue CDs weren't really a thing, USB was a new thing at the time, and I was on dial-up.

Re:Suicide Linux by asadjb on Friday October 27, 2017 @05:00AM (#15566760)
Re:Suicide Linux by peckrob on Thursday October 26, 2017 @11:28PM (#15565492)
A few months back I was wiping some old drives using a USB->SATA adapter plugged into an old Linux machine I keep around for experimenting on random things. Mostly because I could just leave it to run for however long it took. There were two drives in the machine, sda and sdb. So the drive came up as sdc.

So then I typed:

$ shred -n1 -v /dev/sda

Took me about 4 seconds to realize what I did before hitting Ctrl-C.

Then, I sighed. Considered whether I could save anything. Realized there wasn't anything on there worth saving, and reinstalled. :)

I'm usually much more cautious than that and I'm thankful it happened on a dumb test machine at home and not something important, but it was still a bummer and my first real sysadmin-type screw up. Mistakes happen, though. Even Linus once dialed his hard drive [0].

[0] https://liw.fi/linux-anecdotes/

Re:Suicide Linux by tscs37 on Friday October 27, 2017 @01:00AM (#15565826)
Stuff like this is why I usually double check and only access disk by anything but the /dev/sdx or /dev/hdx labels; too easy to blow up in your face.
Re:Suicide Linux by tcprst on Friday October 27, 2017 @05:23AM (#15566841)
Shortly after I started using Fedora as my daily driver I was attempting to dd if=/dev/zero the MBR and partition table off a USB disk sdb and accidentally wiped the one off of sda instead.

As luck would have it, I had the output of fdisk -l /dev/sda in my terminal scrollback buffer and was able to recreate the partition table with no damage done.

Re:Suicide Linux by legohead on Thursday October 26, 2017 @06:24PM (#15563742)
A friend and I were working on a codebase and he did a similar typo:

rm *>o <-- kept shift held down while he pressed period

Been using "make clean" ever since.

Re:Suicide Linux by FeepingCreature on Thursday October 26, 2017 @07:12PM (#15564074)
git clean -fixd
Re:Suicide Linux by FullyFunctional on Friday October 27, 2017 @02:22AM (#15566148)
Waay back in the day I was using crusty old shared Sun3 workstations. The keyboard was really sticky because, well, some students are pigs. I developed the habit of SLAMMING the Enter key on each command, until one day I was deleting backup files (rm *~) and my fingers grazed the delete button before striking Enter...
Re:Suicide Linux by tripzilch on Thursday November 02, 2017 @06:05AM (#15609062)
> The keyboard was really sticky because, well, some students are pigs.

I work at a technological youth centre, teaching kids cool things to do with computers, programming, music and whatnot. All the hardware we get is donated from businesses, schools, etc. (because volunteers / zero-budget).

And this is just ... ahh. I usually cope by trying not to notice and focus on the screen instead. Sometimes though the ick overwhelms and I fail, curse and go on a hunt for a slightly less gross keyboard. And wash my hands after--though I kind of wonder if that even really makes a difference in this particular scenario (except for the idea of it), afaik the main benefit of washing your hands (in these situations, not if you're a surgeon or a cook etc) is some kind of herd-immunity deal isn't it? And given the keyboards stay dirty, and the kids continue to work on them hands-to-keyboard-to-nose-to-mouse-to-mouth-to-keyboard-to-everything-repeat (esp. the younger ones).

You know what would be really nice? Dishwasher-safe keyboards.

And yeah (before anyone replies with a link), I'm sure those exist already. Except that many of the places that need them don't budget for new (or specialty) keyboards but rely on donated used ones. But it would be really nice to have :) :)

Re:Suicide Linux by FullyFunctional on Friday November 03, 2017 @04:37PM (#15622043)
The solution implemented roughly a year into my position was to liberally spread cans of wet-cleaning-wipes. It was such as obvious solution and it helped tremendously.

Alternative keyboards weren't an option in those Sun 3 days, but I've brought my own chair, keyboard, and mouse to work for decades now.

Re:Suicide Linux by pjc50 on Friday October 27, 2017 @05:13AM (#15566813)
Years ago, I forget how, I managed to wipe the partition table of a DOS PC. I ended up reconstructing it by hand using MS-DOS Debug and a copy of Peter Norton's book.

Another fun one: "killall" on Linux kills processes with names matching a string. "killall" on Solaris reboots the machine ...

Re:Suicide Linux by mar77i on Friday October 27, 2017 @05:56AM (#15566990)
Great choice of name for a different thing. https://xkcd.com/144/
Re:Suicide Linux by inamberclad on Thursday October 26, 2017 @06:23PM (#15563734)
Re:Suicide Linux by lloeki on Thursday October 26, 2017 @06:56PM (#15563972)
Nope, real life occurrence. A variant includes mashing Enter on a valid rm line but on AZERTY keyboards that may mean fat fingering the nearby asterisk key.
Re:Suicide Linux by pjmlp on Friday October 27, 2017 @02:48AM (#15566238)
Once I wiped /etc/passwd on a Solaris system due to a typo.

Luckily I was able to recover its contents, while hoping not to lose the network connection during the process.

Re:Suicide Linux by netsharc on Friday October 27, 2017 @09:10AM (#15567915)
The 1st line is a bit of a DOS-habit anyway, rm *o would work just as well....