{"id":320,"date":"2007-11-19T22:39:19","date_gmt":"2007-11-20T03:39:19","guid":{"rendered":"http:\/\/blogs.n1zyy.com\/n1zyy\/2007\/11\/19\/undoing-bad-tar-files\/"},"modified":"2007-11-19T22:39:19","modified_gmt":"2007-11-20T03:39:19","slug":"undoing-bad-tar-files","status":"publish","type":"post","link":"https:\/\/blogs.n1zyy.com\/n1zyy\/2007\/11\/19\/undoing-bad-tar-files\/","title":{"rendered":"Undoing bad tar files"},"content":{"rendered":"<p>Proper &#8216;etiquette&#8217; for packaging a tar file is to package it so that it extracts to a directory. But sometimes, the files are packaged by an idiot, and, when extracted, just extract the files right to whatever directory it&#8217;s in. (Which is fine, <strong>if you expect it<\/strong>.)<\/p>\n<p>tar takes a &#8220;t&#8221; option (&#8220;t&#8221; for &#8220;list&#8221;&#8211;get it? I don&#8217;t&#8230;) to list (lis<strong>t<\/strong>?) the files in a directory. You can use it two ways:<\/p>\n<ul>\n    <li>Pre-emptively: <tt>tar ft file.tar<\/tt> will show you how it&#8217;d extract.<\/li>\n    <li>Retroactively: <tt>rm `tar ft file.tar`<\/tt> will list the files, and pass them as an argument to rm, deleting the mess it just made.<\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Proper &#8216;etiquette&#8217; for packaging a tar file is to package it so that it extracts to a directory. But sometimes, the files are packaged by an idiot, and, when extracted, just extract the files right to whatever directory it&#8217;s in. &hellip; <a href=\"https:\/\/blogs.n1zyy.com\/n1zyy\/2007\/11\/19\/undoing-bad-tar-files\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,8,13],"tags":[],"class_list":["post-320","post","type-post","status-publish","format-standard","hentry","category-computers","category-hero-of-the-day","category-linux-tips"],"_links":{"self":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/320","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/comments?post=320"}],"version-history":[{"count":0,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/posts\/320\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/media?parent=320"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/categories?post=320"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.n1zyy.com\/n1zyy\/wp-json\/wp\/v2\/tags?post=320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}