Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

We use a flash card on our MySQL server. After a reboot, there is a dead directory entry in the flash card mount; rm -rf export-20130413-013547 returns the error rm: cannot lstat 'export-20130413-013547': Invalid argument.

Below is my ls -lrt output.

?--------- ? ?    ?         ?            ? export-20130413-013547
drwx------ 2 root root 143360 Apr 13 17:10 export-20130413-154729

Plus, when I want to see its inode by ls -i, the directory's inode is 0.

0 export-20130413-013547
share|improve this question

migrated from stackoverflow.com Apr 27 '13 at 14:29

This question came from our site for professional and enthusiast programmers.

2  
did you try fsck? –  mata Apr 13 '13 at 17:22

1 Answer 1

This is an orphaned directory entry. I don't know what file system the flash card uses (is it vfat?), but fsck may help, as may just unlinking it without bothering with stat - rm -rf will first try to figure out whether you're seleting a directory, and even a normal rm will try to do clever things. /usr/bin/unlink export-20130413-013547 (part of coreutils) will do that for you.

share|improve this answer

Your Answer

 
discard

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