1

I've been having great difficulty removing a directory from my external hard drive on my mac, I'm out of ideas now and was hoping someone here would be able to shine a light on this.


Here are some of the things I've tried:

1) Deleting the file and emptying the Trash folder

I get the message "The operation can't be completed because the item "folder" is in use."

2) Securely emptying the Trash folder

Same message as above.

3) Using Terminal to navigate to Trash and using the command rm -rfv *

Command runs, file is still there. Oddly, running "ls" shows that the directory isn't in the Trash folder but I can still see it in Finder.

4) Moved the file back into its original location and running rm -rfv * there

I get the message: "rm: folder/: Directory not empty"

I open the directory in finder, there is nothing there. I "cd" into it and can see one file (and it's not a dot file) in there.

Attempt to remove this file, and I get: "rm: file.ext: No such file or directory".

So I try this: "echo Hello > file.ext", now in Finder and when I view the contents of the directory in Terminal, I see TWO file.ext.

Proceed to removing this file, it removes one of them, the original file is still there.

I check my permissions of the directory and file, for my directory I have all permissions to read, write and execute (drwxrwxrwx) but I can't check the file because apparently it does not exist.


Any solutions out there? I don't really want to install any freeware to force delete it (it probably won't be able to anyway).

  • did you try rebooting yet? Running Disk Utility over the drive? – Tetsujin Apr 5 '15 at 15:45
  • I can't confirm that at all. I'm on Yosemite too, if I put something to the Trash, it ends up in my $HOME/.Trash. That folder has the mode 700, along with the "deleted" files there is a file .DS_Store. And I can delete all with just rm -rf .Trash. – ott-- Apr 5 '15 at 17:08
  • @Tetsujin Did you mean to run Disk Utility to format my hard drive? No doubt, that would probably work, but it's not practical for a 2TB hard drive. – 201403540 Apr 5 '15 at 17:59
  • @ott-- Sure, any other file would be deleted like that no problem. There's something peculiar about this particular file, it seems to exist but doesn't at the same time. – 201403540 Apr 5 '15 at 18:01
  • You can also try the fuser and lsof utilities to find out the process the are using that directory. – ott-- Apr 5 '15 at 18:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.