0

I have an Xcode project which I just deleted so I could rewrite it. (I used rm and rmdir) Here's the problem:

Though ls says that the folder is clean, Finder says it's still, there, and, what's more has the same files it had before I cleaned it.

Output of ls -GFal when run in that directory:

Terminal listing with <code>ls</code>

What Finder thinks is there:

What finder thinks is there

Note: the second photo is exactly what the folder looked like before I cleared it.

I deleted the folder itself, but Finder is still showing it (and it's old contents)

I am using OS X Yosemite 10.10.1.

EDIT: When I restarted, it worked fine. But I would still like to know WHY it happened.

  • Some ide's will continue to remake a project folder, even if it is deleted, if you do not remove it from within the ide. I only have limited experience with XCode, so I cannot say for sure, but I have seen it happen in some of the JetBrains ide's and it may be happening here. – AMR Aug 17 '15 at 19:54
  • The problem isn't with Xcode. I think it's something to do with Finder. – Élektra Aug 17 '15 at 20:00
  • You deleted the project from within XCode? – AMR Aug 17 '15 at 20:02
  • No, from Terminal. But question has changed. See latest edit. – Élektra Aug 17 '15 at 20:07
  • But thanks for trying to help! – Élektra Aug 17 '15 at 20:09
1

Did you definitely use the command line to delete the folder?

One behaviour that has struck me as strange a few times on OS X is that if you are working in a folder in the Terminal but then delete it in the Finder, you can continue to work with the folder perfectly happily in the Terminal. Even in it's new home within the Trash.

If you try to open the Trash in the Finder and access anything in there you'll just get an error, but within Terminal you are able to work with the same files quite happily. You can even launch them from there and continue to work with them in other applications perfectly happily (for example opening a txt file in TextWrangler).

Also if you type "open ." in the Terminal it will open the folder in a Finder window and everything will look okay right up until the point you try open a file at which point the Finder will tell you "The document XXX can't be opened because it's in the Trash."

To make things even stranger, even though other applications will identify the path to the folder and its contents as ~/.Trash/foldername, if you type pwd in the Terminal it will still think it's at the previous location.

If you hadn't rebooted I would have suggested right-clicking on the window title to see if the folder in the Finder window is where you though it was. But now that you've rebooted... :)

  • Yes. I most definitely did. Twice. – Élektra Aug 17 '15 at 22:18
  • You deleted the files twice in the Terminal? How did you manage that? Surely the second attempt would just result in an error message? – Alistair McMillan Aug 17 '15 at 22:21
  • I deleted the contents, and then the folder itself. Then I checked again, and recreated the folder empty, and deleted it again. – Élektra Aug 17 '15 at 22:27
0

I had the same problem and I solved it by relaunching Finder. Here's how I relaunched Finder:

  1. Hold the ⌥ (alt/option) key on your keyboard
  2. Right click on the Finder icon in your Dock
  3. click Relaunch

Here's a youtube video elaborately showing how to relaunch Finder.

Hope that helps.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .