7 ms·
The world where you know you that a) you have an incredibly powerful key with no safeguards at your fingertips and b) you might be in a breaking news situation
by bonaldi 12y ago
The world where you know you that a) you have an incredibly powerful key with no safeguards at your fingertips and b) you might be in a breaking news situation and nonetheless you go for the key right next to the dangerous one carelessly enough that you miss?
Think about it: Unix is equally as "insane". If you're the guy on the console who meant to clean out some crap dir and accidentally typoed "rm -rf /" and then caused an international crisis you're going to get fired too.
Then years later HN will call for Dennis Ritchie to get fired instead.
- canjobear 12y agoAre you trying to say it's OK because Unix behaves analogously? It is definitely a problem with Unix also.
- bonaldi 12y agoIt is. Which is why everyone in Unix who types "rm -rf " then types their next character _very carefully_ and reads the line before committing. I'm trying to say that when you've got something dangerous without safeguards, you take care around it. Not taking care of known-dangerous things and causing severe damages as a result is an arguably good case for dismissal.
- graylights 12y agoThe proper answer is to type "rm <dir> -rf" otherwise you're risking a stray strike on enter.
- gatehouse 12y agoThe other proper answer is to have a good backup and recovery system.
- goblin89 12y ago> The other proper answer is to have a good backup and recovery system. And, of course, that should've been the solution to OP's incident with the Korean Airlines flight 007. Backups, surprisingly, are scarcely mentioned at all in this whole thread.
- baddox 12y agoBut typing "rm -rf /" is significantly harder to do accidentally than typing F7 instead of F6.
- graylights 12y agoNot really, a lot of novice unix users are of the habit of removing files with -rf switch. I cringe everytime I see it. The command "rm -rf ~/blue/" is just a single space key from being equivalent to "rm -rf /" with "rm -rf ~/blue /"
- jonreem 12y agoOn any modern system it's actually "sudo rm -rf / --no-preserve-root" and then entering your password while staring at the command. "rm -rf ~/blue /" will not come close to deleting / unless you are in the habit of running every command as sudo, even ignoring the presence of --no-preserve-root
- daurnimator 12y agoExcept when: (these are terrible lessons to learn) 1. You type it into the wrong system (D'oh) 2. You have run `mount --bind / /somewhere/else` then `rm -rf /somewhere` a week later :(
- colanderman 12y agoIt boggles my mind that --one-file-system is not the default :/
- jfb 12y agoMuch, much, much the worse is "rm -rf ~ /blue". I don't give a crap about 99% of the stuff outside of $HOME, but of course, the stuff in $HOME is the stuff that's trivial to destroy.
- lloeki 12y agoYou're missing the point: $ cd dir where there are source files and temp files $ rm *.tmp # or so you think '.tmp not found' # too bad
- nmjohn 12y agoExcept he didn't know there was a breaking news situation. He said pushing the wrong button wouldn't normally be a big deal.
- bonaldi 12y agoHe said he came in to find the system running, and the only time that happened was when Washington was waiting for info. And even if you don't buy that, if pushing the button's not a big deal it doesn't need all the safeguards everyone's yelling for. (Had such safeguards been in place he might equally well have seen them, thought "oh, nobody's in, this will do what I want anyway" and approved it).
- iancarroll 12y agoOne might wonder if that workstation showed the online and offline status of all the computers.
- vacri 12y agoThat button needs a safeguard even if it's not an international incident. Even if only one person would lose a few hours' work from an all-nighter, work for something that's not so important, it's still someone's work. And given that it's right next to a 'single terminal reset' key, it should be immediately obvious to anyone who's ever used a keyboard - mistakes can and do happen, even when you're fluent.
- coldpie 12y agoAnd yet, to this day, Firefox has both Ctrl-Q (close all Firefox windows without prompting) and its neighbor Ctrl-W (close current tab) and refuses to change that or provide remappable keyboard shortcuts. One of the biggest UI failures I'm aware of in 2014. https://bugzilla.mozilla.org/show_bug.cgi?id=52821 https://bugzilla.mozilla.org/show_bug.cgi?id=52821
- hrjet 12y agoThis in combination with "Restore all tabs on startup" not being the default is a disaster. The first thing I do on a new Firefox installation is enable "Restore all tabs on startup".
- megablast 12y agoAlso, the situation where somebody has to be fired. I imagine that someone wanted someone's head, so whose head should it have been? They guy who wrote the system couldn't be fired, he was in a different company. And maybe a macro has been assigned to that key, so it wasn't his fault anyway.
- colanderman 12y agoThe person in charge of minimizing risk to their internal systems. Unfortunately, most small companies have no-one who fills that role, or if they do, it's the same person who both has the power to fire others, and is unwilling to entertain the notion that they themselves are at fault.
- thrownaway2424 12y agoYou forgot the part where the only reason he was fucking with the F6 key in the first place was to play a game. That's irresponsible and grounds for firing.
- ghayes 12y agoActually, from the article he was a system administrator and another employee had been playing a game which froze her own terminal. The author did nothing wrong except press the wrong button (and to your point: not report his coworker for playing games on her terminal in her free-time).
- bdunbar 12y ago> not report his coworker for playing games on her terminal in her free-time). I was enlisted in the Marines, MOS as a programmer (4063), 1989 - 1993. I never really programmed, but spend my time as a small computer support guy. Computer games were officially forbidden, but unofficially tolerated, provided one was discrete. I suspect the same 'don't ask don't tell' policy applied to EUCE at the embassy in question. Sea story. My team was once directed by our boss, the Major, to 'sweep' the command for 'games' and remove them from computers. This took the better part of two weeks, and was massively unpopular with our peers. 'A Marine On Duty Has No Friends', we repeated to ourselves. We even got into the spirit of things and deleted games from _our_ computers. Near the end of this evolution I hand-carried some paper into my Major's office. He was, yes, playing a computer game. He did at least have the grace to look embarrassed.
- mreiland 12y agorm -rf / is not quite the same as the f7 key restarting all machines sitting right next to the f6 key to restart a single machine. you cannot fat finger rm -rf /
- pjc50 12y agoMany years ago I wrote a kernel module for my own use in response to a similar incident. It checked to see if the calling process was deleting a file called ".landmine" and killed the calling process if it was. Far from perfect - it depended on the order of deletion - but a more general solution than preserve root. Of course it still requires the user to mark things they consider "important".
- kstenerud 12y agoThe worst unix disaster I ever saw happened to one of my co-workers. He was working on a client machine, logged in as root because he needed to compile and install some complicated software. As he was working, he did an ls -l /bin and copy-pasted it to a text editor so he could make sure everything was installed correctly. Unfortunately, after returning to his console, he accidentally hit paste. Most of /bin was actually symlinked somewhere else. As you know, ls shows symlinks like this: lrwxrwxrwx 1 root root 20 Apr 27 17:02 cc -> /etc/alternatives/cc Guess what happens when you paste a whole list of those into a console as root?
- deleted 12y ago[deleted]
- talmand 12y agoThe worst unix disaster ever? Could you elaborate for non-unix people such as myself?
- smwht 12y agoThe important character here is the '>'. This redirects output to a file and overwrites the file. The lrwxrwxrwx will only print an error, but the redirect to the target executable will erase the target. For example: $ echo "asdf" > foo $ cat foo asdf $ lrwxwrwxrwx 1 root root -> foo lrwxrwxrwx: command not found $ cat foo $ So basically, this zero'd out every executable on the system.