The power went out at home and my Linux server (Plugbox Linux) went down. After it came back up, one of the files on the USB drive that was connected is corrupt. "ls -il" gives this:
? -????????? ? ? ? ? ? server.prefs
How can I remove this file? I googled a bit and found out how to delete a file by inode number, but I can't even get the inode number of this file.
Any ideas?
Did you try fsck on that unit?
Run fsck first to ensure the data is consistent. You may have to use sudo to gain the require privileges to repair.
Then you can use
rm -i
to remove the file. You may want to use less or more to read the file first to see if you want to keep it first.There are a number of tools which allow you to browse and delete files. I use mc and emacs from the command line. If you use a graphical interface, the file browser will also handle the cleanup.