MacOS – I have a directory behaving very strangely

macos

I have a directory that is behaving very strangely, perhaps it got corrupted. I can move the directory freely, either in Finder or terminal (I'm running Mac OS X Lion). But any query on the 'internals' of the folder (ls, rm, du, etc…) hangs. Not just fails, but I can't even kill the process with ^C, I need to force quit the terminal app and restart the app.

Any thoughts on what's happening and how to fix it?

Best Answer

If I had to put money on this I would bet on a disk problem -- Generally speaking the filesystem won't just hang for no reason: It's usually because it asked the disk to read or write something and the disk is taking its sweet time responding.

If you are not already using it, I strongly suggest installing and using the latest version of SMARTreporter to monitor your drive for failure signs.

If SMARTreporter gives your drive a clean bill of health try running "Verify Filesystem" and "Repair Disk Permissions" (available through Disk Utility) -- If "Verify Filesystem" finds problems you may need to boot off your OS X install/recovery disk in order to repair the problem.