Finder is showing many files which I have deleted 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:



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.
I had the same problem and I solved it by relaunching Finder. Here's how I relaunched Finder:


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


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

Hope that helps.