{"id":12520,"date":"2016-04-01T13:26:28","date_gmt":"2016-04-01T07:56:28","guid":{"rendered":"http:\/\/blog.taragana.com\/?p=33"},"modified":"2016-04-01T13:26:28","modified_gmt":"2016-04-01T07:56:28","slug":"mini-story-deathly-silence-of-linux-after-rm-rf","status":"publish","type":"post","link":"https:\/\/blog.taragana.com\/mini-story-deathly-silence-of-linux-after-rm-rf-12520","title":{"rendered":"Mini-Story: Deathly Silence of Linux (after rm -rf \/*)"},"content":{"rendered":"

Silence of Linux (after rm -rf \/* )<\/strong>
\nTo be fair, rm -rf \/* <\/b>was taking way too long with several millions of files in deep hierarchy. So I ran Delete (Java based recursive File & Directory Delete Tool).<\/a>
\nFinally all data that could be deleted was deleted. I could’ve run shred<\/strong>, I could’ve run dd on the drive itself ( dd if=\/dev\/urandom of=\/dev\/sda<\/code> ), I chose the simpler path.
\n-bash-3.2# clear
\n-bash: \/usr\/bin\/clear: No such file or directory
\n-bash-3.2# ls
\n-bash: \/bin\/ls: No such file or directory
\n-bash-3.2# echo *
\nboot dev media misc net proc sys var
\n-bash-3.2# echo boot\/*
\nboot\/*
\n-bash-3.2# echo dev\/*
\ndev\/initctl dev\/pts dev\/shm
\n-bash-3.2# echo misc\/*
\nmisc\/*
\n-bash-3.2# echo net\/*
\nnet\/*
\n-bash-3.2# echo net\/*
\nnet\/*
\n<\/code>
\nOnly one thing left to do:
\n
\n-bash-3.2# reboot
\n-bash: reboot: command not found
\n<\/code>
\nI still have the final weapon:
\n
\n-bash-3.2# echo 1 > \/proc\/sys\/kernel\/sysrq
\n-bash-3.2# echo b > \/proc\/sysrq-trigger
\n<\/code>
\nThis is pretty much the same as pressing the reset button on the server (if equipped). No daemons will be shut down gracefully, no filesystem sync will occur, and you may get the wrath of a fsck (or worse, a non-booting server) upon reboot. But what do I care?
\nR.I.P.<\/p>\n","protected":false},"excerpt":{"rendered":"

Silence of Linux (after rm -rf \/* ) To be fair, rm -rf \/* was taking way too long with several millions of files in deep hierarchy. So I ran Delete (Java based recursive File & Directory Delete Tool). Finally all data that could be deleted was deleted. I could’ve run shred, I could’ve run […]<\/p>\n","protected":false},"author":1,"featured_media":34,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[12],"tags":[66],"_links":{"self":[{"href":"https:\/\/blog.taragana.com\/wp-json\/wp\/v2\/posts\/12520"}],"collection":[{"href":"https:\/\/blog.taragana.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.taragana.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.taragana.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.taragana.com\/wp-json\/wp\/v2\/comments?post=12520"}],"version-history":[{"count":0,"href":"https:\/\/blog.taragana.com\/wp-json\/wp\/v2\/posts\/12520\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.taragana.com\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/blog.taragana.com\/wp-json\/wp\/v2\/media?parent=12520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.taragana.com\/wp-json\/wp\/v2\/categories?post=12520"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.taragana.com\/wp-json\/wp\/v2\/tags?post=12520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}