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
Question marked as Best reply

Feb 1, 2011 4:19 PM in response to stenya

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.

Feb 1, 2011 4:32 PM in response to thomas_r.

Yes, this is the problem.
The filename contain '/' character.

I tried your suggestion earlier, the result was then and now again:

rm: /Users/stenya/.Trash/a: Directory not empty


The 'a' letter is a directory where the file is. I am able to rename it, move from trash to Desktop or anywhere containing this strange file. (I think this folder is indifferent to the problem.)

Feb 1, 2011 5:56 PM in response to stenya

stenya wrote:

I am able to rename it, move from trash to Desktop or anywhere containing this strange file.


If this is the case, then drag it out of the trash onto your desktop.

Open Terminal (Application-->Utilities-->Terminal)

1) paste:

sudo rm -i



2) (enter a single space after command) then drag the file into the Terminal window (this is a shortcut to typing the file path.)
3) then press enter
4) enter your password
5) if the file is indeed the one you want deleted, then enter "y' (this deletion cannot be undone)

Feb 1, 2011 6:03 PM in response to stenya

Okay, here's another possibility. First, execute the following two commands:


cd ~/.Trash/a/
ls -il


Now, at the very beginning of the line showing the problem file in the listing, there should be some number. Now, take that number and execute the following command:


find . -inum 123456 -exec rm -i {} ;


...where you replace "123456" with the number for that file. You'll be prompted if you want to remove the file - press 'y' and hit return.

Feb 1, 2011 6:37 PM in response to thomas_r.

Round-1:

stenyamac:.Trash stenya$ cd ~/.Trash/a/
stenyamac:a stenya$ ls -il
ls: Thumbs.db:encryptable: No such file or directory
stenyamac:a stenya$


I tried to get the inode number of folder 'a', then delete by inode:

stenyamac:a stenya$ cd ~/.Trash/
stenyamac:.Trash stenya$ ls -il
total 0
3988370 drwxr-xr-x@ 3 stenya staff 102 Dec 18 01:18 a
stenyamac:.Trash stenya$ find . -inum 3988370 -exec rm -i {} ;
rm: ./a: is a directory
find: ./a/Thumbs.db:encryptable: No such file or directory
stenyamac:.Trash stenya$


crazy

Feb 1, 2011 6:41 PM in response to leroydouglas

After moved from Trash to Desktop, open a terminal and try drag the mystic file:

stenyamac:.Trash stenya$ sudo rm -i /Users/stenya/Desktop/a/Thumbs.db:encryptable
Password:
rm: /Users/stenya/Desktop/a/Thumbs.db:encryptable: No such file or directory
stenyamac:.Trash stenya$


Let's drag the folder 'a':

stenyamac:.Trash stenya$ sudo rm -i /Users/stenya/Desktop/a
rm: /Users/stenya/Desktop/a: is a directory
stenyamac:.Trash stenya$

Feb 1, 2011 6:50 PM in response to thomas_r.

Yes, the colon ":" is the OS9 path separator. I've tried at all command you recommend, and a lot of google result said that. (Strange, but I think Adobe Scripts use colon yet...)

It is very strange, because this "/" is in the filename, but it should not exist, should not created.
Some forums said maybe windows create the file.

I've found one solutione what I cant try: Attaching the drive to OS9, that will be able to delete.
But I have no OS9...

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.