{"id":13,"date":"2006-10-25T01:42:00","date_gmt":"2006-10-25T08:42:00","guid":{"rendered":"http:\/\/sp2hari.com\/?p=13"},"modified":"2020-06-20T09:05:48","modified_gmt":"2020-06-20T09:05:48","slug":"rm-rf-o","status":"publish","type":"post","link":"https:\/\/sp2hari.com\/index.php\/2006\/10\/25\/rm-rf-o\/","title":{"rendered":"rm -rf * :-O"},"content":{"rendered":"<p><a onblur=\"try {parent.deselectBloggerImageGracefully();} catch(e) {}\" href=\"http:\/\/photos1.blogger.com\/blogger\/4844\/1276\/1600\/rm.png\"><img decoding=\"async\" style=\"margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;\" src=\"http:\/\/photos1.blogger.com\/blogger\/4844\/1276\/320\/rm.png\" alt=\"\" border=\"0\"><\/a><\/p>\n<p>Went home for diwali hols and the moment i entered my room , the first thing i did is to switch on the comp. I have already taken a resolution that no tech , no php , no linux for the next 5 days [ resolutions are meant be broken , you know \ud83d\ude42 ] . So instead of booting the comp in linux , i booted the comp in windows ( i had no clue what i was going to do in windows ) .<\/p>\n<p>My sister had stored a few harry potter movies which i was in no mood to see.After some 5-10 minutes of arbit clicking , i decided windows is not for me :-). I noticed a folder called books which was the only useful thing for me in my comp apart from the linux. But reading a book will make me break the resolution. Though reluctant , i started with the &#8220;Unix Haters Book&#8221;. When i started , i never had an idea how great the book will be .<\/p>\n<p>The book will make anyone hate unix ( this includes linux also ) and i am not an exception. That too even after the first chapter , i started to realize the drawbacks [this is a better way to say hate \ud83d\ude42 ] of shell , the most powerful and the tool which i liked the most in Unix or Linux.<\/p>\n<p>So here is the details of the first chapter in short. It mostly blasted a singlr command &#8220;rm&#8221;. Now i realise the deadliest command one can ever type is &#8220;rm&#8221;.<\/p>\n<p>The first thing i liked in the book is the way they described unix.<br \/>\n\u00e2\u20ac\u0153 Who would have thought it: Unix, the hacker\u00e2\u20ac\u2122s pornography.\u00e2\u20ac\u009d<br \/>\nI have no clue why the author mentioned Unix as hacker&#8217;s pornography , but i seriously liked the guts of the author to say something like this . I did realize that this book is good after reading the foreword ( very few books can do this ) . After reading the first chapter , the author made sure that whenever i type rm , i will surely remember this book.<\/p>\n<p>The first chapter started with the quote saying<br \/>\n\u00e2\u20ac\u0153Two of the most famous products of Berkeley are LSD and Unix. I<br \/>\ndon\u00e2\u20ac\u2122t think that this is a coincidence.\u00e2\u20ac\u009d<br \/>\n\u00e2\u20ac\u201dAnonymous<\/p>\n<p>Another chapter said this<br \/>\nThe most horrifying thing about Unix is that, no matter how many<br \/>\ntimes you hit yourself over the head with it, you never quite manage<br \/>\nto lose consciousness. It just goes on and on.<br \/>\n\u00e2\u20ac\u201dPatrick Sobalvarro<br \/>\nThe attack on \u00e2\u20ac\u0153rm\u00e2\u20ac\u009d gave many real life-horror stories .<br \/>\n<span style=\"font-weight: bold;\">\u00e2\u20ac\u0153rm\u00e2\u20ac\u009d Is Forever<\/span><br \/>\nA series of exchanges on the Usenet news group alt.folklore.computers illustrates our case:<br \/>\nDate: Wed, 10 Jan 90<br \/>\nFrom: djones@megatest.uucp (Dave Jones)<br \/>\nSubject: rm *<br \/>\nNewsgroups: alt.folklore.computers2<br \/>\nAnybody else ever intend to type:<br \/>\n% rm *.o<br \/>\nAnd type this by accident:<br \/>\n% rm *&gt;o<br \/>\nNow you\u00e2\u20ac\u2122ve got one new empty file called \u00e2\u20ac\u0153o\u00e2\u20ac\u009d, but plenty of room<br \/>\nfor it!<br \/>\nActually, you might not even get a file named \u00e2\u20ac\u0153o\u00e2\u20ac\u009d since the shell documen-<br \/>\ntation doesn\u00e2\u20ac\u2122t specify if the output file \u00e2\u20ac\u0153o\u00e2\u20ac\u009d gets created before or after the<br \/>\nwildcard expansion takes place. The shell may be a programming lan-<br \/>\nguage, but it isn\u00e2\u20ac\u2122t a very precise one.<\/p>\n<p>In my comp i got a file named o , seems the output file gets created after the wild card expansion takes place.<\/p>\n<p><span style=\"font-weight: bold;\">Here is the next real life story <\/span><br \/>\nDate: Wed, 10 Jan 90 15:51 CST<br \/>\nFrom: ram@attcan.uucp<br \/>\nSubject: Re: rm *<br \/>\nNewsgroups: alt.folklore.computers<br \/>\nI too have had a similar disaster using rm. Once I was removing a file<br \/>\nsystem from my disk which was something like \/usr\/foo\/bin. I was in \/<br \/>\nusr\/foo and had removed several parts of the system by:<br \/>\n% rm -r .\/etc<br \/>\n% rm -r .\/adm<br \/>\n\u00e2\u20ac\u00a6and so on. But when it came time to do .\/bin, I missed the period.<br \/>\nSystem didn\u00e2\u20ac\u2122t like that too much.<br \/>\nUnix wasn\u00e2\u20ac\u2122t designed to live after the mortal blow of losing its \/bin direc-<br \/>\ntory. An intelligent operating system would have given the user a chance to<br \/>\nrecover (or at least confirm whether he really wanted to render the operat-<br \/>\ning system inoperable).<br \/>\n<span style=\"font-weight: bold;\">The third case is really really important and a dangerous one .<\/span><br \/>\nDate: Wed, 10 Jan 90 10:40 CST<br \/>\nFrom: kgg@lfcs.ed.ac.uk (Kees Goossens)<br \/>\nSubject: Re: rm *<br \/>\nNewsgroups: alt.folklore.computers<br \/>\nThen there\u00e2\u20ac\u2122s the story of the poor student who happened to have a<br \/>\nfile called \u00e2\u20ac\u0153-r\u00e2\u20ac\u009d in his home directory. As he wanted to remove all his<br \/>\nnon directory files (I presume) he typed:<br \/>\n% rm *<br \/>\n\u00e2\u20ac\u00a6 And yes, it does remove everything except the beloved \u00e2\u20ac\u0153-r\u00e2\u20ac\u009d file\u00e2\u20ac\u00a6<br \/>\nLuckily our backup system was fairly good.<\/p>\n<p>Now i stopped reading the book. I realised that i will surely start a Windows User Group , Trichy if i complete the book. \ud83d\ude1b .<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Went home for diwali hols and the moment i entered my room , the first thing i did is to switch on the comp. I have already taken a resolution that no tech , no php , no linux for the next 5 days [ resolutions are meant be broken &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-13","post","type-post","status-publish","format-standard","hentry","category-code"],"_links":{"self":[{"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/posts\/13","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/comments?post=13"}],"version-history":[{"count":2,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/posts\/13\/revisions"}],"predecessor-version":[{"id":1481,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/posts\/13\/revisions\/1481"}],"wp:attachment":[{"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/media?parent=13"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/categories?post=13"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sp2hari.com\/index.php\/wp-json\/wp\/v2\/tags?post=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}