Deleting an undeletable file

Joined
Nov 24, 2008
Messages
2
Reaction score
0
Points
1
Hi,

On my MacBook homedir I have a file called "?.?Trash", without the
quotation marks, but with the question marks. It appears only when I ls in
a terminal, but it does not appear in the Finder.

ls -l gives:

drwx------@ 2 avishporer staff 68 Nov 24 15:05 ?.?Trash

Any idea how to delete it ?

simply
rm "?.?Trash"
gives
rm ?.?Trash: No such file or directory

This probably has something to do with the fact that I'm unable to empty
by Trash in the regular way. Only sudo rm works.

Any help will be appreciated,

Avi
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
if you do a ls -li

it will show you the inode # for that directory, then you can delete it by that as such...

mikeMbp:~ mike$ mkdir foobar
mikeMbp:~ mike$ ls -li
<snip>
18834406 drwxr-xr-x 2 mike staff 68 Nov 24 10:14 foobar

mikeMbp:~ mike$ find . -inum 18834406 -exec rm -irf {} \;




disclaimer: Please, if you don't understand these commands ask about them, read the man page, google them etc before using them.

You should ALWAYS execute a find without the -exec switch if you're at all in question of what it will return (find . -inum 18834406 will return the correct directory name etc)
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top