{"id":88,"date":"2008-12-16T21:27:17","date_gmt":"2008-12-16T21:27:17","guid":{"rendered":"http:\/\/dev.gregbueno.com\/wp\/vexvox\/2008\/12\/16\/rm_r\/"},"modified":"2008-12-16T21:27:17","modified_gmt":"2008-12-16T21:27:17","slug":"rm_r","status":"publish","type":"post","link":"https:\/\/gregbueno.com\/vexvox\/2008\/12\/16\/rm_r\/","title":{"rendered":"rm -r"},"content":{"rendered":"<p><em>rm -r<\/em><\/p>\n<p>In UNIX command prompt-speak, it simply means &quot;remove recursively&quot;. More verbosely, it means &quot;nuke everything on this directory and every directory under it.&quot;<\/p>\n<p>The <em>rm<\/em> command only removes files, not directories. To remove directories, you can use the <em>rmdir<\/em> command. But I was raised on graphical user interfaces (Windows Explorer, anyone?), and I&#039;m conditioned to expect widespread damage from a click of a delete button. It gets tiresome typing <em>rm<\/em> and <em>rmdir<\/em> separately, especially with lots of files and directories.<\/p>\n<p><em>rm -r<\/em> is the lazy way out &#8212; it removes files and directories. It&#039;s fast, convenient, and like any other delete function, deadly if you&#039;re not careful.<\/p>\n<p>My near-death experience happened this afternoon when I typed <em>rm -r [path redacted]<\/em> to remove files I mistakenly checked out of source control. The instant I pressed Enter, I realized I was at the wrong directory level, and I was in fact deleting a folder containing source for five of my sites &#8212; and the Smarty templates for <em>all<\/em> of my sites &#8212; from my production server. That is, from my publicly accessible sites!<\/p>\n<p>I could have just checked it all out of source control again, but some portions of the sites weren&#039;t put under source control for very specific reasons. Thankfully, I mirror everything in a test environment so that I can iron out bugs before moving changes to the production environment. So I just copied the test files over to production and was up and running again.<\/p>\n<p>Aside from a few oddities, which were cured by clearing out the Smarty cache, I was maybe borked for about 20 minutes.<\/p>\n<p>Nonetheless, <em>rm -r<\/em> is one of tho most dangerous keystrokes someone in my field can type. As vigilant as I try to be, sometimes quick fingers prevail.<\/p>\n<p>In other news, I have managed to move the <a href=\"http:\/\/www.eponymous4.com\/\">Eponymous 4 official site<\/a> &#8212; and it&#039;s <a href=\"http:\/\/eponymous4.gregbueno.com\/\">&quot;audition&quot; sister site<\/a> &#8212; over to CodeIgniter. They don&#039;t look or act any different, which is the point. The sites should act and feel like nothing has changed, even though a lot have. That&#039;s how I measure a successful launch.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>rm -r In UNIX command prompt-speak, it simply means &quot;remove recursively&quot;. More verbosely, it means &quot;nuke everything on this directory and every directory under it.&quot; The rm command only removes files, not directories. To remove directories, you can use the rmdir command. But I was raised on graphical user interfaces (Windows Explorer, anyone?), and I&#039;m [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-88","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/s4Bkgj-rm_r","_links":{"self":[{"href":"https:\/\/gregbueno.com\/vexvox\/wp-json\/wp\/v2\/posts\/88","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gregbueno.com\/vexvox\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gregbueno.com\/vexvox\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gregbueno.com\/vexvox\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gregbueno.com\/vexvox\/wp-json\/wp\/v2\/comments?post=88"}],"version-history":[{"count":0,"href":"https:\/\/gregbueno.com\/vexvox\/wp-json\/wp\/v2\/posts\/88\/revisions"}],"wp:attachment":[{"href":"https:\/\/gregbueno.com\/vexvox\/wp-json\/wp\/v2\/media?parent=88"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gregbueno.com\/vexvox\/wp-json\/wp\/v2\/categories?post=88"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gregbueno.com\/vexvox\/wp-json\/wp\/v2\/tags?post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}