Posts Tagged finder

Deleting a Stubborn File

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’t pay attention to the copying, just dragged and dropped from the source (NTFS) to the destination (HFS+).

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… it refused to be deleted!

Perplexed, I thought it might have been a permissions problem:


But as you can see, I am the owner and I have the permissions.

Wondering if it has something to do with Finder, I dropped into Terminal and tried to delete the file manually:


OK, Operation not permitted… perhaps I need to be a super user?


Gah.. still no luck. :( So getting frustrated now, I started browsing around to find some answers. Not finding anything and finally about to give up thinking there’s some NTFS -> HFS+ or file system error, I just happened to look up and noticed the icon for the parent folder has a small… padlock?


Going up a level, and looking at the info for the parent folder revealed that the folder was Locked.


So I unchecked this and BAM, I was able to delete the file now. So turns out the “Locked” 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 “Read-only” file/folder can still be modified by just accepting an extra message box. In OS X with Finder, anything locked is seriously “locked” making everything read-only until it is “unlocked”.

Some more noob info about the Locked feature in Finder:

  • 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.
  • 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.
  • 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.

So if you are having trouble deleting a file in Mac OS X, try checking if the folder is Locked! Don’t make the same nub mistake as I did. :P

, , ,

No Comments