Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What is the most damage (of whatever kind) that you have ever caused with a single mistaken/mistyped/misguided command line? I deleted a production system database by mistake a while back, for example, but I was lucky (i.e. backed-up) and there was no permanent data loss, lost money, property damage etc.

Most importantly (for votes), what do you do to make sure it will not ever happen again?

share

locked by Michael Hampton Oct 23 '13 at 15:06

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

closed as off topic by Mark Henderson Mar 28 '11 at 4:31

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

9  
Since this is a poll, it should be CW –  Eddie May 6 '09 at 2:00
4  
How should they know it's a poll progmatically? –  Mikeage May 6 '09 at 8:14
1  
If the mechanism is the same as SO's, even if you can edit a question, you can't change it to CW. Only the OP or a moderator can do that. –  chaos May 6 '09 at 14:09
9  
Good idea - post your most destructive mistake publicly on the internet for all future employers to see! :) –  Sam Schutte May 13 '09 at 19:29
show 3 more comments

81 Answers 81

In a DOS prompt I typed the following command at my computer

C:\deltree /y *.*

Now I just select with the mouse what I want to delete and delete them.

share
add comment

Working for hours and hours editing configuration file to configure an application, only to confuse the configuration file for a temporary file, and delete it. Damn auto-completion (and my own inattentiveness!)

share
add comment

Delete the payroll database... :(

rm PAYROLL

Had intended to delete a text file of a similar name, PAYROLL.txt. Spent the rest of the afternoon restoring the previous backup and then running a series of audits to rebuild the payroll based on other supporting tables.

All in all, it was a pretty freaky experience (both the loss and the recovery)... :)

Piko

share
add comment

When removing a config snippet I had just added into a core mpls router I was doing it by typing

no

then pasting in the line to remove. Unfortunately I had the wrong line in my paste buffer. I thought I had

vll id X

I was wrong and I still had the previous command in the buffer. The last thing I saw from that router before it stopped responding was

router(config)#no router mpls

Thankfully we had out of band management so I was able to get back in and restore all the mpls config from backup.

As for making sure it never happens again. First I argued with upper management that we should have automatic service deployment like we did for the switch network and I made sure "router mpls" never ever went near my paste buffer again. I always typed that line in by hand.

share
add comment

% dd if=linux_boot_floppy.img of=/dev/hda

instead of:

% dd if=linux_boot_floppy.img of=/dev/fda

/dev/hda == hard drive

/dev/fda == floppy drive

First thought was, "Oh wow, that was fast". Second thought was, "Oh ****".

share
show 2 more comments

I ran cleanlinks in my $HOME directory. Apparently, some links should stay dirty and some empty directories matter (say the ones in your mailbox folders). Feh.

share
show 1 more comment
Thinking: "Before i do this upgrade, I'd better be safe than sorry, and take a backup."
Writing: tar xzvf backup.tgz /path/to/production_site &
... time passes
... checking size of backup.tgz
Thinking: Why is this file not growing?
... thinking some more
... time freezes, realising that a week of development on the site is gone, overwritten by an old backup.
share
add comment

In teaching a new Junior Admin how to do something, he made a typo and we didn't catch it before he hit enter. So instead of:

kill -9 <somepid>

We did:

kill -%9 <somepid>

On a Solaris 7 machine, this apparently translates to "halt". (I could be mis-remembering the exact typo, but a % was involved).

The machine was a three hour drive away at a client's site. We had to call them and beg them to switch the machine back on.

share
add comment

I once copy/pasted some "bash magic" script which I didn't understand from a slashdot comment, which had no warning and no comment other than that one liner. That's just stupid, I know.

It turned out that evil lines spawned bash processes in a loop which rendered the server completely unresponsive. Luckily it was based on XEN and I was able to reboot it using xm reboot (calling data center to do manual reboot is always messy). On the other hand, I didn't have access to dom0 instantly.

Lesson learned - don't copy/paste stuff you don't know :)

share
show 1 more comment

I used to be a linux lab admin, and one of the students was trying to get her Joomla install to work. She needed to add execute permissions to one of the files. Not knowing much, she was going to do:

chmod -R 777 /path/to/joomla/

Except what she did was:

chmod -R 777 /path/to/joomla /

Turns out that her complete filesystem(/etc/passwd, /etc/shadow...) was 777.

When you don't specify all the modes, it presumes you want to remove the permissions that would go with them. So everything was now mode 0777(i.e. no sticky, set user/groupID). There's a lot of important stuff that's set-uid, like su.

share
show 1 more comment

Most annoying mistake I remember doing was a some years back when hardware where expensive and we often used software routers/firewalls rather than hardware ones. One night we got hit by some pretty bad DDoS. Trying to debug this/figure out what I could do, I logged onto the main router and started doing tcpdumps, however the system were so insanely unresponsive that I figured Id better just drop the firewall rules so that I can hopefully get some sorely needed cputime. So I typed;

ipchains -F

Problem is, default policy of all chains were drop. Had to call up my boss in the middle of the night, take a cab over and fetch a keycard then get onsite and manually reboot the router.

share
add comment

Back in dark ages of DOS there was a utility called, as far as I remember, killtree, that deleted a directory tree without any confirmation.

I then had a keyboard that had the \ under the Return.

Under Norton Commander I wanted to delete a directory tree in c:\ I had the selection over, so I type:

killtree Right Ctrl + Return

Ctrl Return combination was used to insert file/dir name under the selection into the command line.

The problem is, instead of Right Ctrl, my finger went to the \...

share
1  
"With great power comes a really large hole in your foot." –  MadHatter Oct 23 '13 at 12:36
show 2 more comments

and now for a Win XP commandline complete screw up :

C:\Somedir> cacls.exe * /r Someuser

did something much worse than expected

share
add comment

I know someone who wrote a custom tool to delete a tree recursively and tested on a network drive that did not return ".." as one of the "find next file" entries.

The first time it ran on a drive that did return ".." it backed up to the root and wiped clean the volume.

share
2  
Why the heck would anybody write a custom tool to do that? Reinvent the wheel much? –  MikeyB Jun 25 '09 at 16:53
show 1 more comment

This was a LONG time ago and I was a real newbie to PCs being primarily a Mac tech. But a big Pharma company in NJ was migrating from WIN 3.1 to Win 95.

Our instructions were to boot from our special network boot floppy, CD to the C: drive and delete everything on the drive with your standard DOS command to do so.

I had done a dozen of these with no problems till one where I forgot to CD to the C: drive. Seems the floppy left your current directory as the network drive that held the install files that you were supposed to just copy to C and then reboot to run.

I think you can see this one coming. I neglected to change directory before issuing "DEL STAR DOT STAR" and the brilliant sysadmin who had set it up made that share R/W to EVERYONE and bang away goes all of the files that were needed by about 30 techs swarming over the building trying to get several hundred PCs upgraded over the weekend.

And to make matters worse, they had no backup.

So everyone went home with no idea of who did this grumbling about lost overtime. And a few SysAdmins grumbling about having to rebuild the install share from scratch.

Needless to say I was "busy" next weekend when they tried again.

share
add comment

shutdown -h now on production database system I was connected via remote ssh tunnel. I suspected something was wrong when instead of shutting down my own box I got the message "connection closed by remote host" ;)

share
add comment

as root:

find / -type d -exec chmod 755 {} \;
find / -type f -exec chmod 644 {} \;

I ended up rebuilding the box.

... true story.

share
add comment

I wanted to remove all "~" backup files (passwd~, group~, resolv.conf~) and on a Swedish keyboard you need to press the ~ button and a space to write a "~" and what I did was:

$ rm  * ~

In /etc

share
add comment

Easy easy... hitting ENTER when my screen has been scrolled up in order to return it to the command line. I've ran the wrong command a few times doing this. I've gotten in the habit of hitting CTRL-C instead.

share
add comment

We had a FTP script that would update directories which housed our Client's reports. The script looked like this...

ftp www.ourcompany.com
cd <ClientsDirectory>/
put *.html ( including index.html ) 

So just what happens when <ClientsDirectory> does not exist?

You get the client's index page as your companys home page... Opps

share
add comment

Ubuntu 10.10, I had only 3gb left on my partition so clearing up files.

I thought, ah well, might as well remove old kernels (GRUB screen was becoming too big too).

sudo apt-get remove --purge 2.6.28*

The asterisk was a little bit... greedy (though I still don't know how it managed to match 2.6.29 and .30).

Epic freakout, didn't dare to ctrl+c (what's worse then deinstalled kernels? that's right, semi-deinstalled kernels). Let it run and reinstalled latest kernel. I even opened an edited document in gedit so it would block any restart (I know, I know...).

share
add comment

cd /

rm -rf ./

share
show 1 more comment
rm -vfr /*

Which I now do: rm -vfr ./*

share
4  
Why not just "rm -vfr *"? –  Ivan May 6 '09 at 0:02
show 2 more comments

using joeware ad tools I had a script which was supposed to change a user account from 512 (active) to 514 (disabled user) in the useraccountcontrol attribute.

the command was:

 admod -b "userdn" useraccountcontrol::514

but I was also attempting to redirect the output by putting a 2>nul on the end, but I missed the space and the 514 became 5142 which caused AD to change user accounts to Computer accounts, this was run on a the production domain against all accounts.

share
add comment

Easy one in - and I've done it more than once:

Del from Some_Table

without any qualification. Always do a 'select from' first now to make sure I've got the correct data.

share
add comment
DROP TABLE [dbo].[WRONGTABLEHERE]

Then the immediate feeling of terror as soon as I executed it.

share
add comment

I was in / instead of another directory and performed the command below.

rm -Rf *

By the time I canceled the command, nearly all the /usr/ directory had been removed.

share
add comment

On a Windows NT 4 domain controller back in the day:

C:\WINNT\System32>DEL *.*

I had been working in a subfolder (WINS I think) and was expecting to delete that folder, but wiped out most of System32 instead.

How do I make sure that never happens again? I do things a little slower these days.. double check that command line before pressing enter.

share
add comment

Back in the DOS days I was trying different commands to see what they do. I knew enough to not mess with fdisk or format but I saw this neat looking command called recover.....wiped out the entire machine....Taught me to never run a command unless you have some idea what it does.

share
show 1 more comment

After 12 hours of weekend work, wanting to check IP address of server hostXYZ and while being logged in to a HP-UX MC/ServiceGuard cluster node, I typed in:

hostname hostXYZ

I was immediately covered in cold sweat. :) Luckily I managed to revert back to old hostname before ServiceGuard even realized what happened. :)

share
1  
What would it have done? –  Barry Brown Jun 25 '09 at 18:05
add comment

protected by Chris S Mar 17 '11 at 12:23

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.