{"id":27,"date":"2009-08-22T10:28:01","date_gmt":"2009-08-22T09:28:01","guid":{"rendered":"http:\/\/blog.soton.ac.uk\/webteam\/?p=27"},"modified":"2009-09-17T09:41:36","modified_gmt":"2009-09-17T08:41:36","slug":"bulk-moving-or-deleting-locked-files-in-osx","status":"publish","type":"post","link":"https:\/\/blog.soton.ac.uk\/webteam\/2009\/08\/22\/bulk-moving-or-deleting-locked-files-in-osx\/","title":{"rendered":"Bulk Moving or Deleting &#8220;locked&#8221; files in OSX"},"content":{"rendered":"<p>A bit off topic this one, but Google didn&#8217;t show up the right answer, so it&#8217;s worth putting it somewhere on the web.<\/p>\n<p>I was trying to move a bunch of files in OSX and it seemed that some of them were &#8220;locked&#8221;. This appears ot be a system flag and can be removed on a single file via the file-info tool. But I&#8217;ve got 100&#8217;s. There&#8217;s a bunch of bad suggestions out there. The information you really need is:<\/p>\n<pre>chflags -R nouchg ...path...<\/pre>\n<p>via the command line. This will remove the &#8220;uchg&#8221; (unchangeable) flag from the path, and recurse down. To view the flags on a file or directory use:<\/p>\n<pre>ls -lO ..path...<\/pre>\n<p>You could use &#8220;uchg&#8221; if you wanted to bulk-set a whole bunch of files to locked, too.<\/p>\n<p>UPDATE: While this worked on the files, I still could not delete the directories. Even from trash. How weird? As it&#8217;s an external drive, I think I&#8217;ll just mount in on linux and hose them there.<\/p>\n<p>UPDATE 2: Upgraded to Snow Leopard and the problem went away. yay.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A bit off topic this one, but Google didn&#8217;t show up the right answer, so it&#8217;s worth putting it somewhere on the web. I was trying to move a bunch of files in OSX and it seemed that some of them were &#8220;locked&#8221;. This appears ot be a system flag and can be removed on [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[106,74],"tags":[],"class_list":["post-27","post","type-post","status-publish","format-standard","hentry","category-osx","category-tips"],"_links":{"self":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/27","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/comments?post=27"}],"version-history":[{"count":5,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/27\/revisions"}],"predecessor-version":[{"id":36,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/posts\/27\/revisions\/36"}],"wp:attachment":[{"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/media?parent=27"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/categories?post=27"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.soton.ac.uk\/webteam\/wp-json\/wp\/v2\/tags?post=27"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}