Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


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 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.

Since this is a poll, it should be CW – Eddie May 6 '09 at 2:00
Then why aren't polls CW by default? – Luke May 6 '09 at 4:19
How should they know it's a poll progmatically? – Mikeage May 6 '09 at 8:14
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
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

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.


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!)


Delete the payroll database... :(


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)... :)



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


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.


% 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 ****".

Awesome - I've done this too, except in my case it was: Write floppy image to floppy, Reboot, "Oh... invalid disk... odd", Remove floppy, see floppy image loader, realize horrible mistake. Only lost the first partition (Windows). – MikeyB Jun 25 '09 at 16:52
I’ve done that too. I thought I was dd’ing an image to /dev/sda5, but I left the 5 off the end. Thankfully given that the OS was running and I had an SFTP connection open to a remote server at the time, I was able to back up just about everything of importance. – Jeremy Visser Oct 12 '10 at 13:15

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.

Could you supply more details? – Marius Gedminas Sep 28 '10 at 22:32
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.

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.


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 :)

Probably what is know as a fork bomb. – Kyle Brandt Apr 9 '10 at 22:10

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.

That is too funny.. – Brian G Jul 9 '09 at 19:56

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.


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 \...

That utility would be deltree – Demetri Oct 22 '13 at 23:27
No no, that was a third party utility. deltree always asked for confirmation, as far as I remember. killtree was more of a dangerous power-user alternative. With great power comes great responsibility, I suppose. ;) – macbirdie Oct 23 '13 at 12:35
"With great power comes a really large hole in your foot." – MadHatter Oct 23 '13 at 12:36

and now for a Win XP commandline complete screw up :

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

did something much worse than expected


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.

Why the heck would anybody write a custom tool to do that? Reinvent the wheel much? – MikeyB Jun 25 '09 at 16:53
It was back in the DOS days and RD /S wasn't available at that time. – piCookie Jul 8 '09 at 18:05

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.


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" ;)


as root:

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

I ended up rebuilding the box.

... true story.


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


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.


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

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


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...).


cd /

rm -rf ./

Were you trying to free up disk space, or what? ;-) – Josh Feb 26 '10 at 15:07
rm -vfr /*

Which I now do: rm -vfr ./*

Why not just "rm -vfr *"? – Ivan May 6 '09 at 0:02
Simply put, I've never thought of that. :( – Jordan S. Jones May 6 '09 at 0:21
Actually ./* works better than a simple * when there are files with names like -f in the current directory. – Marius Gedminas Sep 28 '10 at 22:36

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.


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.


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


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.


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.


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.

The "recover" command was sometimes useful on a floppy disk. But it couldn't cope with a hard disk. This was partly because its working space was a whole disk. – staticsan Jun 11 '09 at 3:08

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. :)

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

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

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

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.