1

I can't empty the trash of my removable drive. At first it appears to empty it correctly (no error message, the sound is played), but the folder in question stays there.

I tried:

jan@MacBook-Pro /Volumes/JD 2 $ sudo rm -rf .Trashes/

which gives errors like the following:

rm: .Trashes//501: Directory not empty
rm: .Trashes/: Directory not empty

Anyways, I narrowed it down to a .svn file that can't be deleted:

root@MacBook-Pro /Volumes/JD 2/.Trashes/501/CD_10.2009/devel/funghos $ ls -altr .svn
-rwxrwxrwx  1 _unknown  _unknown  690 Oct 21  2009 .svn
root@MacBook-Pro /Volumes/JD 2/.Trashes/501/CD_10.2009/devel/funghos $ rm -f .svn
root@MacBook-Pro /Volumes/JD 2/.Trashes/501/CD_10.2009/devel/funghos $ ls -altr .svn
-rwxrwxrwx  1 _unknown  _unknown  690 Oct 21  2009 .svn

As you can see, no error appears, but the file doesn't get deleted. Huh?

houbysoft
  • 9,182

5 Answers5

0
  • Connect your removable HD to a win
  • Show hidden files (folder option/ uncheck hidden files)
  • Try to delete .Trash folder in the root of the usb drive
  • If errors, use unlocker to delete
  • Plug in your mac again, you will see the annoying files/folders in Trash disappeared

cheers

0

This is due to the MNT_IGNORE_OWNERSHIP flag being set for the drive when mounted. The unknown user and group are exactly what show up when root views files on a drive for which permissions are ignored. When a user views the permissions, the files will show up as their own. I'm surprised you can't delete the .svn file from your own account (not root)

Please see this Ask Different Answer for more direction. Basically, you'll need to uncheck the "Ignore ownership on this volume" checkbox from an inspector on the drive info.

If you can't delete it from your user account, try setting yourself as the file owner with the ignore flag unset.

ephsmith
  • 2,235
0

You can do this instruction:

1- Drag the file from your Trash bin to the Desktop.
2- Launch a Terminal
3- Type

cd ~/.Trash && sudo rm -rf [your file path on the desktop]

4- Then press enter and enter your password

Am1rr3zA
  • 13,219
  • 14
  • 68
  • 88
0

I finally fixed the issue by deleting the file on a Windows machine. Must be a bug in OS X or something?

houbysoft
  • 9,182
  • not a bug — it appears none of the answers here are 100% correct, which is obviously why you resorted to using this route. – l'L'l Jul 22 '12 at 20:24
-1

If you can locate the file in Finder, can bring up the info pane (cmd-i) on that file and check its not locked or has incorrect permissions?