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 9:42 AM in response to Kurt Lang

I think this tell us that the fs is corrupt

chflags, I tried two format:

stenyamac:~ stenya$ sudo chflags -R nouchg ~/.Trash/a/"Thumbs.db/encryptable"
Password:
chflags: /Users/stenya/.Trash/a/Thumbs.db/encryptable: No such file or directory
stenyamac:~ stenya$ sudo chflags -R nouchg ~/.Trash/a/Thumbs.db:encryptable
chflags: /Users/stenya/.Trash/a/Thumbs.db:encryptable: No such file or directory


Let's see *ls -aolR .Trash*:

stenyamac:~ stenya$ ls -aolR .Trash/
total 0
drwx------ 3 stenya 102 Feb 2 18:39 .
drwxr-xr-x+ 50 stenya 1700 Feb 1 20:56 ..
drwxrwxrwx 3 stenya 102 Dec 18 01:18 a
.Trash//a:
ls: Thumbs.db:encryptable: No such file or directory
total 0
drwxrwxrwx 3 stenya 102 Dec 18 01:18 .
drwx------ 3 stenya 102 Feb 2 18:39 ..

Feb 2, 2011 9:43 AM in response to Kurt Lang

Kurt,
Good point about the immutable flag. That's certainly one possibility. The other is that the version of Macfuse used is not 100% compatible with the operating system in question.

NTFS by default on the Mac is read only. If you want to make it writable, Macfuse is one way. Some others are:

http://www.paragon-software.com/home/ntfs-mac/
http://www.paragon-software.com/home/hfs-windows/index.html
http://www.tuxera.com/products/tuxera-ntfs-for-mac/

Some may be better at handling this type of issue.

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

Dang! It seems this is the problem:

ls: Thumbs.db:encryptable: No such file or directory


Even enclosed in quotes, UNIX is treating the / as a path separator, as indicated by the colon. So it's trying to delete a file named 'encryptable' from a non existent ~/Trash/a/Thumbs.db/ folder.

I think I'm officially out of ideas. 😟 Other than this one, to enclose the entire path in quotes.

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

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

http://discussions.info.apple.com/thread.jspa?threadID=2474253
May yield a clue.

Also your statement that the terminal treats it as a folder, when the Finder treats it as a file yields another. Try right clicking (control-clicking) the file and see if it offers "Show Package Contents". If it does, what are the package contents? If there are none, try Tinkertool to reveal invisible items:

http://www.bresink.com/osx/TinkerTool.html

Feb 2, 2011 11:16 AM in response to stenya

In earlier versions of OS X, you couldn't create a folder or a file, or copy one onto the system with either a / or \ in the name. Why Apple ever changed the code to allow it is beyond me. That was asking for trouble. UNIX is still underneath the GUI.

I suppose it came from enough users who griped that every time they copied old, OS 9 and earlier files onto an OS X system, they didn't like that / and \ characters automatically got converted to an _ underscore. Everyone (long time Mac users) were used to every character being allowed except for the : colon. Apple shouldn't have given in and try to make / and \ work in a folder or file name.

Feb 2, 2011 11:51 AM in response to Kurt Lang

And this conversion between / and \ and _ is the key!

*Bootcamp, WinXP.*
I've installed Mediafour MacDrive 8. It has a 10 days free trial.
Open to RW the mac HFS+ partition, open .Trash.
There the file, WITH UNDERSCORE in its name: Thumbs.db_encrytable
Select....aaaaand....delete....tada. GONE!
And I deleted all the .Trash.

Boot back to OSX, Verify Disk: OK; Verify Permission: always do a lot of stuff: OK.

And now, restored balance to the Force

A question left open: Why was not able OSX to do this?
It can be a bug?

-----
MacDrive8: [http://www.mediafour.com/products/macdrive>

Message was edited by: stenya

Feb 2, 2011 12:01 PM in response to stenya

I suspect because the source of the file was an NTFS system, which you mentioned earlier. The method it got transfered to the Mac may be suspect, as it sounds like some of the meta data that made it knowledgeable that it was part of an NTFS system got carried along with it.

It might be a question for Macdrive to explain as they appear to be the experts that let you bypass everything.

Feb 2, 2011 12:40 PM in response to stenya

Yes!!! A bit of a roundabout solution, but WAY better than formatting the drive just to get rid of one stinkin' file.

A question left open: Why was not able OSX to do this?
It can be a bug?


Maybe, but I would guess, despite Apple's attempt to override UNIX's normal way of operating, it's just the underlying UNIX system treating a / or \ as it always does; as a path separator.

Feb 3, 2011 3:49 AM in response to stenya

Select....aaaaand....delete....tada. GONE!


Awesome!

A question left open: Why was not able OSX to do this?
It can be a bug?


I think that there must be a bug in there somewhere that allowed a file with a reserved character in its name to be copied to your hard drive. That should not have happened, and I suspect that the reason you had so much trouble deleting it, is that the programmers simply never coded for a situation that wasn't supposed to ever be able to happen.

I'd recommend filing a bug report using the [Apple BugReporter|http://bugreport.apple.com>. (Note that you'll have to set up a [free ADC membership|http://developer.apple.com/programs/register> to do so.) Try to include as much information about how this happened as possible. Hopefully, your experience will help prevent anyone else from having the same problem.

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.