A directory on an NTFS partition no longer lists its contents, but the files are still there if I can remember their full names. Is there a way to get the directory listing working again?
I caused the breakage by (stupidly) yanked an external disk's lead out before the computer had reported that it had been unmounted successfully. The partition is NTFS, mounted on Ubuntu Linux as type fuseblk
. I'd just copied a file into a directory on it. The copy command had finished. I then ran umount
on the mount point, waited a few seconds for it actually to unmount, and then took its lead out (before then realizing that I hadn't actually seen umount
successfully complete).
On re-mounting, the rest of the disk contents seems fine, but the directory I was copying the file into won't display its contents. If I cd
to that directory, I get this:
$ ls
ls: reading directory 'purple': Input/output error
However, from that same directory, if I can remember the name of a subdirectory, the files in there are listed, and open just fine:
$ ls London
[contents of the London subdirectory displayed]
I don't think I've actually lost any files — at least for any subdirectory names that I can remember the names and exact spelling/punctuation/capitalization of.
Is there any way to recover the directory listing, or find out which subdirectories are in it? Clearly the information is still on the disk somewhere. Even recreating a directory listing with bogus names (dir0001
, dir0002
, etc) would be fine: I could look inside them to manually rename them back.