This post is a little lengthy, sorry. The short version is: I have a directory that I can't delete. Terminal gives, "input/output error," when I try to interact with it. I've scanned the disk for errors and none are found. The root of the problem seems to be that the system thinks this is a link, when in fact it's a directory. How can I delete it?
Story mode: I have a directory called "media" on my desktop, into which I mounted another directory via SSH (fuse/sshfs). The connection was lost while the directory was open. Finder crashed, and the directory disappeared from the desktop. It's still there, however:
Desktop mike$ ls -1 media templates Desktop mike$ mkdir media mkdir: media: File exists
Almost everything I try to do to the directory gives me an, "input/output" error:
Desktop mike$ ls -i ls: media: Input/output error Desktop mike$ sudo rm -rf media rm: media: Input/output error Desktop mike$ sudo unlink media unlink: media: Input/output error Desktop mike$ sudo chmod 777 media chmod: media: Input/output error Desktop mike$ touch media touch: media: Input/output error cd ./media cd: error retrieving current directory: getcwd: cannot access parent directories: Input/output error
I get the same if I try to remount the remote SSH directory:
fuse: bad mount point `./media/': Input/output error
Even though it's not visible on the desktop or in Finder, I can search and find it. Right-clicking the search result doesn't offer a delete option -- only open and properties. Properties shows created and modified time (correctly) and a blank icon. I can also chose to open the item, in which case it gives me:
"The alias 'media' can't be opened because the original item can't be found. Delete, Fix, or OK."
When I try delete, the same dialog keeps popping back up; choosing fix asks to select a new item to link to. Doing this reports: "Unknown error -1407," which Google tells me means, "Expected a folder but got a file."
I can move the directory, but only if I keep it on the desktop:
Desktop mike$ mv ./media ./a Desktop mike$ ls -i ls: a: Input/output error Desktop mike$ mv ./a ../ mv: cannot resolve a: /Users/mike/Desktop/a
Is there anyway I can delete this? Or at least convince the system that it's a directory and not a link?