Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Relocated home folder and a non-emptiable trash' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Relocated home folder and a non-emptiable trash
Authored by: Han Solo on Jun 02, '04 02:25:59PM
I agree with another poster that your disk may well be trashed (slight pun intended), but before you go reinstalling the OS: Have you tried working with the file inode (serial number) instead of the name? That is, in your Trash directory (or in the folder(s) in your Trash), type

ls -i
to list each file and its inode number. Suppose the file in question has inode 1234567. Then, you ought to be able to execute a find command something like the following (Note: I have not tested this, so use at your own risk):

find . -inum 1234567 -delete
If that doesn't work, then I would seriously consider erasing the drive and restoring from backup....

[ Reply to This | # ]
Relocated home folder and a non-emptiable trash
Authored by: Han Solo on Jun 02, '04 02:35:22PM
Well, I just clicked on the Unix Power Tools link below, and the very next page suggests the following syntax:

find . -inum 1234567 -exec rm {} \;
Guess I wasn't too far off.... :)

Anyway, one of these ought to work for you. If not, I suspect your drive is on its way out anyway.

BTW, you never said how these files got those odd-character names in the first place. Is this a reflection of file corruption, or did you name these files that way yourself? If the latter, you might try changing your shell or to a terminal program that better supports high-ASCII (or Unicode?) characters. Perhaps iTerm would work better? (Just a guess....)

[ Reply to This | # ]

Relocated home folder and a non-emptiable trash
Authored by: fltman on Jun 02, '04 04:41:25PM

Unfortunately... iTerm did not do the trick. :(



[ Reply to This | # ]
Relocated home folder and a non-emptiable trash
Authored by: Han Solo on Jun 03, '04 08:21:22PM
iTerm or not (i.e., plain ol' Apple Terminal), deleting files by their inode should work fine — provided your drive is not in the process of giving up the ghost. I tested it on two machines here successfully. What happened when you tried the find command listed above?

[ Reply to This | # ]
Relocated home folder and a non-emptiable trash
Authored by: fltman on Jun 04, '04 02:38:12AM
well, I thought i wrote that but apperently there is no post. Anyway it didn't work out not because of find but because of ls when trying to find out the file node:

maskinen:~/.Trash/webb/PersonalAdmin/StaffImg_ab andersbj$ls
ri_reng??????pg
maskinen:~/.Trash/webb/PersonalAdmin/StaffImg_ab andersbj$ ls -i
ls: ri_rengí¶í½ªpg: No such file or directory
As you can se ls with no flags works just fine but when using flags on those directories like -l or -i ls complains just like above. :(

[ Reply to This | # ]
Relocated home folder and a non-emptiable trash
Authored by: Han Solo on Jun 05, '04 10:21:03PM
OK, now I wonder if something is up with your version of ls. Do you have fink installed? Have you mucked around with some Unix tools? Have you been r00ted?

What happens when you type the following:


which ls
And what about this one:

\ls -i
(Note: the second command is 'ls -i' immediately proceeded by a single slash '' — the unshifted character just above the Return key on Apple's keyboards (in the U.S., at least).)

[ Reply to This | # ]
Relocated home folder and a non-emptiable trash
Authored by: fltman on Jun 07, '04 06:05:50AM
Well, again no luck:

which ls
/bin/ls

\ls -i
ls: ri_rengí¶í½ªpg: No such file or directory
:(

[ Reply to This | # ]
Relocated home folder and a non-emptiable trash
Authored by: fltman on Jun 02, '04 04:25:59PM
excellent hint, but my system has it's own way of saying no. Check this out:

ls
ri_reng??????pg
maskinen:~/.Trash/webb/PersonalAdmin/StaffImg_ab andersbj$ ls -i
ls: 
ri_rengí¶í½ªpg: No such file or directory
as you can se "ls" refuses to show the list if anya flags are being used. The same thing goes with the -l flag:

ls
ri_reng??????pg
maskinen:~/.Trash/webb/PersonalAdmin/StaffImg_ab andersbj$ ls -l
ls: ri_rengí¶í½ªpg: No such file or directory


[ Reply to This | # ]