Deleting locked files from a USB drive in OS X
I ran into the following dialog when trying to “Empty Trash” in OS X (10.4)
The problem was caused by a couple of hundred locked files on the USB drive, which OS X happily sent to the trash but would not let me delete. Normally you can just restore a file from the Trash to a normal file, and then alter the properties (File -> Get Info in the Finder). But since the files were on a USB drive I couldn’t see them in the Trash.
So the files were effectively stuck, and I couldn’t empty the Trash without hitting “continue” a couple of hundred times (and the locked files would still be there, so that would happen every time).
After a quick google, and a look at man chflags, I found a solution. Open terminal, and run the following commands (replacing DRIVE with the volume name of your USB drive)
NOTE: run the following command at your own risk!
find /Volumes/DRIVE/.Trashes -type f -exec chflags nouchg {} \; -print
After than, “Empty Trash” worked as normal.

February 24th, 2008 at 2:00 pm
i think my buddy Paul can beat ya on that one
see http://pantsinmotion.com/2008/02/23/stupid-error-of-the-month/
February 25th, 2008 at 1:37 am
Yeah, my one was pretty subtle, that one’s definitely a stupid bug!
So, m1k3y, when are you getting a mac?