Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

You must log in to answer this question.