Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a strange issue on a Mac OS X 10.8.0.

With ls, I'm able to see a file, but not with ls -la:

me@machost$ ls
file.txt

And with ls -la:

me@machost$ ls -la
ls: file.txt: No such file or directory
total 64
drwxrwxr-x  2 _www  mygroup  2048 Nov  2 08:23 .
drwxrwxr-x  5 _www  mygroup  2048 Nov  2 09:01 ..

Does anyone have an idea whats happening here?

share|improve this question
    
What does file file.txt output? – Xyon Nov 2 '12 at 9:29
    
me@machost$ file file.txt file.txt: cannot open `file.txt' (No such file or directory) – Daniel Nov 2 '12 at 9:30
    
Sorry, browser spammed that comment. Can you see it in a GUI file browser at all? – Xyon Nov 2 '12 at 9:33
    
I can see it in the Finder, although I can't see the size, and created/modified/last opened attributes. – Daniel Nov 2 '12 at 9:36
    
It sounds like the ghost of a file, or a very oblique dangling symlink. I'm guessing rm will have none of it to get rid of it? – Xyon Nov 2 '12 at 9:37

Could it be a corrupted directory entry for a deleted inode? ls finds the directory entry but ls -l cannot locate the inode to get the additional information.

I'd try checking the filesystem

See also Cannot delete invisible files on OSX

share|improve this answer

You must log in to answer this question.

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