Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Impossible to delete a file

I've found a file on my Mac, named Thumbs.db/encryptable.
I was able to delete (put in trash), but when I empty the trash the file stay there.

I try disk repairing from OSX dvd boot.
Try deleting in single user mode, and a lot of other method what I've found on google.
Try delete by id.
Nothing...

This is the main drive, mac os extended journaled.
The drive is in good condition.

IS THERE ANY OTHER WAY TO ELIMINATE A FILE?

Macbook Pro 13, Mac OS X (10.6.6)

Posted on Feb 1, 2011 4:13 PM

Reply
Question marked as Best reply

Posted on Feb 1, 2011 4:19 PM

Does the file actually contain the '/' character? If so, that's likely what is causing the problem. That's a special character on Unix-based systems.

Try this, assuming you're using an admin account: put it in the trash, then open the Terminal and paste in this command, then hit return:


sudo rm -rf ~/.Trash/*


Be sure to copy and paste, not re-type... that is an extremely dangerous command, and a typo could destroy you. Note that you'll be prompted for your account password, and won't see anything when you type it.

If that doesn't fix it, let us know.
69 replies

Feb 2, 2011 4:27 AM in response to a brody

Of course!
The folder 'a' contain that file.
In previous post I mentioned that the folder works normal: move to trash, put back, rename, etc.

So, I've put back to Desktop and try to delete with the application.
Then try to move to trash and force empty the trash with the app you suggested.

Nothing.

Feb 2, 2011 5:10 AM in response to stenya

Dismount any drives, flash drives, usb sticks, optical discs by dragging their icons to the trash.
Remove any external connected drives once their icons disappear
Quit all open pograms so nothing but Finder appears in command-tab.
Click once on the "a" folder.
Get info and change Ownership and Permissions.
Make sure you have access and apply to all enclosed items.
Go to Applications-> Utilities -> Disk Utility
Select First Aid and click Repair Permissions.
Reboot holding the shift key.
Drag to trash.
Force empty trash.

Message was edited by: a brody

Feb 2, 2011 6:49 AM in response to Kurt Lang

Might want to try this one again. I didn't account for the fact the file you're trying to delete is within a folder named 'a' in the trash. This may work.

rm -f ~/.Trash/a/"Thumbs.db/encryptable"

A trick that worked well in OS 9 and earlier may also get rid of it.

Take the folder back out of the trash. Create a new folder, doesn't matter what you name it, and put the folder 'a' within the new folder.

Create another new folder named 'a' and drag it into the new folder. The OS will ask you if you want to replace the folder named 'a' that already exists. Click Replace.

Feb 2, 2011 7:36 AM in response to stenya

Have you tried my suggested path:

Dismount any drives, flash drives, usb sticks, optical discs by dragging their icons to the trash.
Remove any external connected drives once their icons disappear
Quit all open pograms so nothing but Finder appears in command-tab.
Click once on the "a" folder.
Get info and change Ownership and Permissions.
Make sure you have access and apply to all enclosed items.
Go to Applications-> Utilities -> Disk Utility
Select First Aid and click Repair Permissions.
Reboot holding the shift key.
Drag to trash.
Force empty trash.

The other option would be to use my software*:

http://www.macmaps.com/software.html

- * Links to my pages may give me compensation.

Feb 2, 2011 7:48 AM in response to a brody

I went through all the steps...
File is still there.

In safe mode I noticed, that folder "a" renamed to "a 16-31-32". But maybe it happened after repair permission. I dont know.

One more info: I'm using MacFuse to read/write ntfs drives. Maybe when I copy a folder from ntfs drives, comes this file. Okay, my bad using free stuff, but osx-hfs should handle filesystem errors.

Feb 2, 2011 8:59 AM in response to stenya

I remember a couple of years ago someone had copied a song by ABBA from a Windows computer to their Mac, and the file contained a character that was OK in Windows, but was illegal on a Mac, with both the Mac OS and the underlying UNIX system unable to cope with the character. The result was that there was no way in either the Finder or the Terminal to rename or delete the file. After going thru pretty much everything discussed here the final result was.....the file remained. We concluded the only thing that would get rid of the silly thing was to reformat the drive, and recommended that the file just be put in a folder somewhere unobtrusive and ignored.

But one other thought occurs to me: could you use Terminal, or Command drag in the Finder, to MOVE the file from your drive to some other drive, such as an empty USB drive, then reformat that?
Francine

User uploaded file
Francine
Schwieder

Feb 2, 2011 9:13 AM in response to Francine Schwieder

I cant rename it.
Tried safe mode, single user mode (console), terminal.
Tried from Windows (bootcamp and parallels too)

I cant move the file itself, only with the folder "a".
The folder can move to anywhere on the drive (hfs partition) but nothing else.

In terminal the ls command cant list it, zero kb length, no permissions, no owner...
technically it is seems that the file not exists, but finder list it.

Message was edited by: stenya

Feb 2, 2011 9:24 AM in response to stenya

It's possible the immutable flag is set. See this article on the subject.

http://discussions.apple.com/thread.jspa?messageID=607591&#607591

In short, try entering this command in the Terminal:

sudo chflags -R nouchg ~/.Trash/a/"Thumbs.db/encryptable"

The sudo command will ask for your admin password before trying to execute the rest of the string. Then try emptying the trash.

Also from the article, if that doesn't work. Enter this in the Terminal:

ls -aolR .Trash

If however you see a line like:
d--------- 2 root wheel schg 68 Oct 19 2001 ????????????HFS+ Private Data

then the System Immutable flag is set, and you cannot deal with this from the Terminal, even with root privileges. You must instead use single-user mode to change that flag...

See the links in Michael Conniff's article I linked to above see what to do in Safe Mode if the schg flag shows up in a listing.

Impossible to delete a file

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.