{"id":199,"date":"2008-09-09T22:51:00","date_gmt":"2008-09-09T22:51:00","guid":{"rendered":"http:\/\/blog.trungson.com\/?p=199"},"modified":"2008-09-09T22:51:00","modified_gmt":"2008-09-09T22:51:00","slug":"what-happens-when-you-do-rm-rf","status":"publish","type":"post","link":"http:\/\/blog.trungson.com\/?p=199","title":{"rendered":"What happens when you do &quot;rm -rf \/*&quot;"},"content":{"rendered":"<p>Just for the fun of it. Here is what happens: <\/p>\n<pre>\n[root@s10 ~]# cd \/\n[root@s10 \/]# dir\nbin   dev  initrd  lost+found  misc  opt   sbin     srv  tmp  var\nboot  etc  lib     media       mnt   proc  selinux  sys  usr\n[root@s10 \/]# rm -rf *\nrm: cannot remove directory `boot': Device or resource busy\nrm: cannot remove directory `dev\/shm': Device or resource busy\nrm: cannot remove `dev\/pts\/1': Operation not permitted\nrm: `proc\/asound\/ICH' changed dev\/ino: Operation not permitted\n[root@s10 \/]#\n[root@s10 \/]# dir\n-bash: \/usr\/bin\/dir: \/lib\/ld-linux.so.2: bad ELF interpreter: No such file or directory\n[root@s10 \/]# ll\n-bash: ls: command not found\n[root@s10 \/]# reboot\n-bash: \/sbin\/reboot: \/lib\/ld-linux.so.2: bad ELF interpreter: No such file or directory\n<\/pre>\n<p>Since the processes are still running, SSH still accept connections, but cannot sign in, can&#8217;t run anything either. Was it fun?!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just for the fun of it. Here is what happens: [root@s10 ~]# cd \/ [root@s10 \/]# dir bin dev initrd lost+found misc opt sbin srv tmp var boot etc lib media mnt proc selinux sys usr [root@s10 \/]# rm -rf * rm: cannot remove directory `boot&#8217;: Device or resource busy rm: cannot remove directory `dev\/shm&#8217;: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts\/199"}],"collection":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=199"}],"version-history":[{"count":0,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=\/wp\/v2\/posts\/199\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=199"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.trungson.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}