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?

migrated from serverfault.com Mar 15 '12 at 18:19

This question came from our site for system and network administrators.

  • 1
    Kurt - Is this on your desktop, or on a machine you administer professionally per the FAQ? – voretaq7 Mar 15 '12 at 18:08
  • No problem - I bounced it over here because it was about to get killed on SF (and because hopefully one of the bigger macheads will think of something I didn't if my answer doesn't work :-) – voretaq7 Mar 15 '12 at 19:52

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.

  • Hey, thank you for the response. I left the problem alone for a bit, then came back here and tried installing and running the software you recommended. With it running, I was able to ls and then rm -r the directory successfully. I'm not sure if this was due to your solution and having the program running, or the gremlins decided to leave my computer alone. Either way, thank you for your advice! – Kurt Spindler Mar 15 '12 at 20:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .