If you think you're having a bad day then things are about to be put into perspective. A man accidentally deleted his entire company because of one mistaken line of code.
A hosting provider named Marco Marsala has removed all trace of his company and the websites he manages for his customers after he accidentally told his computers to delete everything in its servers.
Mr Marsala wrote on a forum for server experts that he was stuck after mistakenly running destructive code on his own computers. However rather than offer any help, most of the replies told him that he had accidentally deleted the data of his company and his clients and effectively destroyed his whole company.
The problem code was "rm -rf": a basic piece of code that will delete everything it is told to. The “rm” tells the computer to remove; the r deletes everything within a given directory; and the f stands for “force”, telling the computer to ignore the usual warnings that come when deleting files. Normally the code will delete everything it is told to but because of the way it was written, no particular area was specified. Thus it deleted everything on the servers.
Mr Marsala confirmed that the code had even deleted all of the backups that he had taken in case of catastrophe because the drives that were backing up the computers were mounted to it.
“All servers got deleted and the offsite backups too because the remote storage was mounted just before by the same script (that is a backup maintenance script).”
Most users agreed that it was unlikely he would be able to recover any of the data.
“I feel sorry to say that your company is now essentially dead,” wrote a user called Sven. “You might have an extremely slim chance to recover from this if you turn off everything right now and hand your disks over to a reputable data recovery company."
Another poster commented that: “You're going out of business. You don't need technical advice, you need to call your lawyer.”
Via The Independent