Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to clean up my lost and found, and I've managed to remove most things, but I'm left with "almost" empty directories, like:

lost+found/#14042862:
total 1324
dr---wx---  2 76040 43010    4096 2011-04-29 07:56 .
dr---wx---  2 76040 43010    4096 2011-04-29 07:56 .
drwx------ 18 root  root  1187840 2011-04-29 07:56 ..
  • How did I get directories with duplicate entries?
  • Is it safe to unlink the directory when rm complains it's not empty?
  • WTF???
share|improve this question
3  
Is that really a duplicate . entry? Run ls -libq to see the inode numbers and expose nonprintable characters. But if you have files in lost+found, your filesystem's probably taken some damage. –  Gilles Apr 28 '11 at 22:23

3 Answers 3

up vote 3 down vote accepted

Yes it's really a duplicate. And a force delete may have worked, but an fsck was the proper fix. Basically, I ran fsck, and it saw some bytes it thought was a directory, so it just put a directory entry for it in the lost+found. Running fsck again actually checked the contents of the directory, found the duplicate, and removed it.

share|improve this answer

I recommend checking the inode listing of the directory. It's possible that they really aren't the same file.

ls -al -i

You might also check to see if one of the directories has a hidden (or non-printable) character with:

ls -al -Q
share|improve this answer

I don't know how you did that, but I'd force delete it and run fsck asap.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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