5

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???
  • 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

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.

2

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
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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