I got a strange error the other day. Attempting to rm -rf nav/ a directory threw "not a directory", but trying to rm nav errored with "is a directory".

How is this possible?

not a directory

link|improve this question
Well, what is it, then? What's "ls -l nav" show? – Rob F Oct 12 '09 at 16:23
feedback

1 Answer

You may have some filesystem corruption. Notice the 1 between the permission and the owner? That's the number of links to the directory inode. A directory should normally have a minimum of two, because it is linked to by the parent directory, and by itself (the . entry it contains). I would guess there is some corruption and your nav directory does not contain a . entry. Can you get anything with ls -la nav?

link|improve this answer
The file/directory is already gone unfortunately, so I can't ls -la nav. – davethegr8 Oct 12 '09 at 17:04
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.