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???
link|improve this question

33% accept rate
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
feedback

3 Answers

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.

link|improve this answer
feedback

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
link|improve this answer
feedback

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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