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

Relocated home folder and a non-emptiable trash System
If your trash refuses to empty and you've already tried all the other hints and tutorials on the web but nothing appears to work, the answer may well be that your home directory is in the wrong location. The Finder will not empty the trash if the home directory is at the root level of the hard disk -- it must be located in the /Users folder. The Finder pretends to empty the trash -- if the Finder is showing a Trash window, then this is closed, but the trash remains full. It's the same for 'Empty Trash' and 'Secure Empty Trash'.

I had added a second hard disk and wanted the whole disk for my home directory. So when I fitted the disk, I set up home to be /ed. Now, months later and after many hours of investigation, I found that moving home to /Users/ed fixed the problem.

[robg adds: This is the first I've heard of this issue -- can anyone else confirm the problem, and/or suggest a fix other than creating a /Users structure?]
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[4,236 views]  

Relocated home folder and a non-emptiable trash | 23 comments | Create New Account
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: momerath on Jun 01, '04 01:42:37PM

Well, you could make a /Users folder, add a symbolic link inside it to ed's home folder, and then make the /Users folder invisible. Make sure the netinfo database shows /Users/ed as being the path to the home folder, and that should do it.



[ Reply to This | # ]
Relocated home folder and a non-emptiable trash
Authored by: fltman on Jun 01, '04 04:00:05PM
I have a simular (trash-related) issue. There are a few files in my trashcan that refuses to be deleted when emptying. I have even tried to do by using the terminal but with no luck:

sudo rm -Rf ~/.Trash/
rm: /Users/andersbj/.Trash//kasta/OkaÌnt album: Directory not empty
rm: /Users/andersbj/.Trash//kasta: Directory not empty
rm: /Users/andersbj/.Trash//new folder/Trash Can #2/f: Directory not empty
rm: /Users/andersbj/.Trash//new folder/Trash Can #2: Directory not empty
rm: /Users/andersbj/.Trash//new folder: Directory not empty
rm: /Users/andersbj/.Trash//webb/PersonalAdmin/StaffImg_ab: Directory not empty
rm: /Users/andersbj/.Trash//webb/PersonalAdmin: Directory not empty
rm: /Users/andersbj/.Trash//webb: Directory not empty
rm: /Users/andersbj/.Trash/: Directory not empty
I'm totally out of luck.

[ Reply to This | # ]
Relocated home folder and a non-emptiable trash
Authored by: wheeles on Jun 01, '04 08:12:58PM

I may be wrong but it looks like you are trying to remove the .Trash directory as well as its contents. Try:

cd ~/.Trash
rm -rf *



[ Reply to This | # ]
Relocated home folder and a non-emptiable trash
Authored by: fltman on Jun 02, '04 02:53:12AM
Well that should make no difference but here's the result anyway:

cd ~/.Trash/
maskinen:~/.Trash andersbj$ sudo rm -Rf *
Password:
rm: kasta/OkaÌnt album: Directory not empty
rm: kasta: Directory not empty
rm: new folder/Trash Can #2/f: Directory not empty
rm: new folder/Trash Can #2: Directory not empty
rm: new folder: Directory not empty
rm: webb/PersonalAdmin/StaffImg_ab: Directory not empty
rm: webb/PersonalAdmin: Directory not empty
rm: webb: Directory not empty


[ Reply to This | # ]
Relocated home folder and a non-emptiable trash
Authored by: mkennard20 on Jun 01, '04 08:20:18PM

I've moved the folder the other day, successful on previous occasions but this time the trash provided a problem.

Solved this by fixed the access rights on the trash. There is a trash on each disk /.Trashes/501 (etc etc) but the one I needed to fix was in the home folder. ~/.trash

you may need to sudo
sudo chown -R shortusername ~/.trash

good luck

michael



[ Reply to This | # ]
Relocated home folder and a non-emptiable trash
Authored by: fltman on Jun 02, '04 02:45:30AM
Nope, the owner of the files is just right but I'll try it, just for show:

sudo chown -R andersbj ~/.Trash/
Password:
chown: /Users/andersbj/.Trash//kasta/OkaÌnt album/du fä° gí¶í¿ som du vill: No such file or directory
chown: /Users/andersbj/.Trash//kasta/OkaÌnt album/02 - Titta det spíµªí°²: No such file or directory
chown: /Users/andersbj/.Trash//kasta/OkaÌnt album/Nilsson - oÌ det d㱦í¶í¿ªag 㫳kar: No such file or directory
chown: /Users/andersbj/.Trash//kasta/OkaÌnt album/Lidingí°¼í·©lls 909 303: No such file or directory
chown: /Users/andersbj/.Trash//kasta/OkaÌnt album/[peter] riktiga 'bíµ¶í½¥r': No such file or directory
chown: /Users/andersbj/.Trash//new folder/Trash Can #2/f/10 tips fí¶í¿¥n snygg sorti.doc: No such file or directory
chown: /Users/andersbj/.Trash//new folder/Trash Can #2/f/12 tips fí¶í¿¥n lyckad líµ¶í´¦í¶í·¡ndling.doc: No such file or directory
chown: /Users/andersbj/.Trash//new folder/Trash Can #2/f/Hur du skriver ett ansíµªí½©ngsbrev.doc: No such file or directory
chown: /Users/andersbj/.Trash//new folder/Trash Can #2/f/Hur du skriver ett uppfíµ®í¹®ingsbrev.doc: No such file or directory
chown: /Users/andersbj/.Trash//new folder/Trash Can #2/f/Riktlinjerna fí¶í¿TPs testpolicy i korthet.doc: No such file or directory
chown: /Users/andersbj/.Trash//new folder/Trash Can #2/f/Sã¶ill rekryterarna ha din ansíµªí°®.doc: No such file or directory
chown: /Users/andersbj/.Trash//new folder/Trash Can #2/f/Vad du bí¶í¿´ã­«a pã©nnan du skickar iv㥠ditt CV.doc: No such file or directory
chown: /Users/andersbj/.Trash//webb/PersonalAdmin/StaffImg_ab/ri_rengí¶í½ªpg: No such file or directory


[ Reply to This | # ]
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 | # ]
Relocated home folder and a non-emptiable trash
Authored by: wheeles on Jun 02, '04 08:21:54AM
Looks like you have a bunch of files with strange characters. This can cause problems with deletion. However, the excellent O'Reilly's Unix Power Tools has an answer to most unix problems. Here's an excerpt I found online that might help.

[ Reply to This | # ]
Relocated home folder and a non-emptiable trash
Authored by: fltman on Jun 02, '04 09:45:42AM
Thanks, I tried it but with no luck. This was interesting:

sudo od -c .
Password:
od: .: Operation not permitted
why is it not possible to run od as root? Very strange. Luckily the ls -b was available so i used it then run the perl version... check ths out:

ls -q
ri_reng??????pg
maskinen:~/.Trash/webb/PersonalAdmin/StaffImg_ab andersbj$ ls -b
ri_reng\355\266\202\355\275\252pg
maskinen:~/.Trash/webb/PersonalAdmin/StaffImg_ab andersbj$ perl -e 'unlink("ri_reng\355\266\202\355\275\252pg");'
maskinen:~/.Trash/webb/PersonalAdmin/StaffImg_ab andersbj$ ls 
ri_reng??????pg
The file is still there. So it didn't work, I also tried the c-hack but with no luck. :( Thanks anyway...

[ Reply to This | # ]
How to deal with strange characters
Authored by: hamarkus on Jun 02, '04 10:42:55AM

Maybe this helps with your strange characters:
- cd into one of the directories
- type 'sudo rm' and then press the Tab button
this will auto-complete the filename (if there is only one file in this folder) in whatever transcription the terminal likes to have these special characters.



[ Reply to This | # ]
How to deal with strange characters
Authored by: fltman on Jun 02, '04 01:04:20PM
Nope, I've tried that but with no luck...

ls
ri_reng??????pg
maskinen:~/.Trash/webb/PersonalAdmin/StaffImg_ab andersbj$ rm ri_reng\355\266\202\355\275\252pg 
rm: ri_rengí¶í½ªpg: No such file or directory
maskinen:~/.Trash/webb/PersonalAdmin/StaffImg_ab andersbj$ ls
ri_reng??????pg


[ Reply to This | # ]
Maybe your directory structure is damaged
Authored by: hamarkus on Jun 02, '04 01:20:29PM

I'm just guessing, but maybe your directory structure is damaged. Try DiskUtility-FirstAid-verify, or another disk utility.



[ Reply to This | # ]
Or have you tried Firewire Target disk mode?
Authored by: hamarkus on Jun 02, '04 01:46:03PM

Or have you tried Firewire Target disk mode?



[ Reply to This | # ]
Or have you tried Firewire Target disk mode?
Authored by: fltman on Jun 02, '04 04:31:06PM

sure I have, I have tried it in firewire mode, I have booted it in OS9, I have mounted it as a afp, smb share on booth osx, os9 and win machines with no luck. I have tried to delete the files by using ftp. I have mad different perl, php, c, java programs that should be able to delete the files but with no luck.



[ Reply to This | # ]
Maybe your directory structure is damaged
Authored by: fltman on Jun 02, '04 04:28:20PM

tried it with no luck. :(



[ Reply to This | # ]
try -r instead of -R
Authored by: verlhum on Jan 17, '05 03:24:12AM
I am surprised no one mentioned this but it seem that the command you are using is slightly wrong for the purpose. The correct command should be
 sudo rm -rf ~/.Trash/*
I prefer to always use * when I am trying to rm something from the trash. The "-R" flag indicates removal of empty directories while the "-r" flag will delete the contents of a directory, then the directory itself. Ran into this problem until in did a man on rm and figured out how the flag worked.

[ Reply to This | # ]