<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Desktop Notes &#187; terminal</title>
	<atom:link href="http://echerng.net/blog/tag/terminal/feed/" rel="self" type="application/rss+xml" />
	<link>http://echerng.net/blog</link>
	<description>With more notes from various desktops!</description>
	<lastBuildDate>Sun, 05 Jun 2011 14:46:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Deleting a Stubborn File</title>
		<link>http://echerng.net/blog/2009/02/25/deleting-a-stubborn-file/</link>
		<comments>http://echerng.net/blog/2009/02/25/deleting-a-stubborn-file/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 01:41:08 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[finder]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://echerng.net/blog/2009/02/25/deleting-a-stubborn-file/</guid>
		<description><![CDATA[During the past week, I was consolidating a bunch of files from my smaller external drives onto a new, larger drive (more on this in a future post!). The new drive is formatted as HFS+ (Mac) while the smaller drives are formatted as NTFS (Windows). I didn&#8217;t pay attention to the copying, just dragged and [...]]]></description>
			<content:encoded><![CDATA[<p>During the past week, I was consolidating a bunch of files from my smaller external drives onto a new, larger drive (more on this in a future post!). The new drive is formatted as HFS+ (Mac) while the smaller drives are formatted as NTFS (Windows). I didn&#8217;t pay attention to the copying, just dragged and dropped from the source (NTFS) to the destination (HFS+).</p>
<p>While going through the files on the new drive, I noticed some duplicate files. Even though the new drive is much larger, of course I still want to save space! Weird thing is trying to delete these files: Finder would ask for my password (sudo?), and afterwards do something, but the file remains&#8230; it refused to be deleted!</p>
<p>Perplexed, I thought it might have been a permissions problem:</p>
<p><img src="http://echerng.net/blog/wp-content/uploads/2009/02/permissions.png" width="265" height="232" alt="permissions.png" /></p>
<p>But as you can see, I am the owner and I have the permissions.</p>
<p>Wondering if it has something to do with Finder, I dropped into Terminal and tried to delete the file manually:</p>
<p><img src="http://echerng.net/blog/wp-content/uploads/2009/02/terminal1.png" width="345" height="125" alt="terminal1.png" /></p>
<p>OK, Operation not permitted&#8230; perhaps I need to be a super user?</p>
<p><img src="http://echerng.net/blog/wp-content/uploads/2009/02/terminal2.png" width="342" height="127" alt="terminal2.png" /></p>
<p>Gah.. still no luck. <img src='http://echerng.net/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  So getting frustrated now, I started browsing around to find some answers. Not finding anything and finally about to give up thinking there&#8217;s some NTFS -&gt; HFS+ or file system error, I just happened to look up and noticed the icon for the parent folder has a small&#8230; padlock?</p>
<p><img src="http://echerng.net/blog/wp-content/uploads/2009/02/header.png" width="178" height="52" alt="header.png" /></p>
<p>Going up a level, and looking at the info for the parent folder revealed that the folder was Locked.</p>
<p><img src="http://echerng.net/blog/wp-content/uploads/2009/02/locked.png" width="266" height="314" alt="locked.png" /></p>
<p>So I unchecked this and BAM, I was able to delete the file now. So turns out the &#8220;Locked&#8221; folder causes anything inside to become read-only. Besides being a nub and not knowing about the locked feature, I was assuming the behavior would be similar to Windows. In Windows, a &#8220;Read-only&#8221; file/folder can still be modified by just accepting an extra message box. In OS X with Finder, anything locked is seriously &#8220;locked&#8221; making everything read-only until it is &#8220;unlocked&#8221;.</p>
<p>Some more noob info about the Locked feature in Finder:</p>
<ul>
<li>Contents of a locked folder cannot be modified. This means nothing can be added, modified, or deleted. Right clicking the contents of the folder shows a different set of options.</li>
<li>Corollary to the previous rule, contents of a locked folder cannot be moved to another folder. Contents can only be copied. Using the CMD key while dragging will not force a move.</li>
<li>Locked Folder A with Folder B inside. Any files/folders inside Folder B are excluded from the locked rules. That is they can be modified without any restrictions.</li>
</ul>
<p>So if you are having trouble deleting a file in Mac OS X, try checking if the folder is Locked! Don&#8217;t make the same nub mistake as I did. <img src='http://echerng.net/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://echerng.net/blog/2009/02/25/deleting-a-stubborn-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

