Man Ac­ci­den­tally ‘Deletes His En­tire Com­pany’ With One Line of Bad Code

The Economic Times - - Around The World -

A man ap­pears to have deleted his en­tire com­pany with one mis­taken piece of code.

By ac­ci­den­tally telling his com­puter to delete every­thing in his servers, host­ing provider Marco Marsala has seem­ingly re­moved all trace of his com­pany and the web­sites that he looks af­ter for his cus­tomers.

Mr Marsala wrote on a fo­rum for server ex­perts called Server Fault that he was now stuck af­ter hav­ing ac­ci­den­tally run de­struc­tive code on his own com­put­ers. But far from ad­vis­ing them how to fix it, most ex­perts in­formed him that he had just ac­ci­den­tally de- leted the data of his com­pany and its clients, and in so do­ing had prob­a­bly de­stroyed his en­tire com­pany with just one line of code. The prob­lem com­mand was “rm -rf”: a ba­sic piece of code that will delete every­thing it is told to. The “rm” tells the com­puter to re­move; the r deletes every­thing within a given di­rec­tory; and the f stands for “force”, telling the com­puter to ig­nore the usual warn­ings that come when delet­ing files.

To­gether, the code deleted every­thing on the com­puter, in­clud­ing Mr Masarla’s cus­tomers’ web­sites, he wrote. Mr Masarla runs a web host­ing com­pany, which l o ok s af t e r t h e servers and in­ter­net con­nec­tions on which the files for web­sites are stored.

“I run a small host­ing provider with more or less 1535 cus­tomers and I use An­si­ble to au­to­mate some oper­a­tions to be run on all servers,” wrote Marco Marsala. “Last night I ac­ci­den­tally ran, on all servers, a Bash script with a rm -rf {foo}/{bar} with those vari­ables un­de­fined one per­son on a cod­ing fo­rum ad­vised Marco Marsala due to a bug in the code above this line.”

“I feel sorry to say that your com­pany is now es­sen­tially dead,” wrote a user called Sven. “You might have an ex­tremely slim chance to re­cover from this if you turn off every­thing right now and hand your disks over to a rep­utable data re­cov­ery com­pany. “This will be ex­tremely ex­pen­sive and still ex­tremely un­likely to re­ally res­cue you, and it will take a lot of time.”

Most users agreed that it was un­likely that Mr Marsala would be able to re­cover any of the data. And as a re­sult his com­pany was al­most cer­tainly not go­ing to re­cover, ei­ther.

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.