Solve the “volume can’t be ejected because it is in use” problem

Occasionally I run into the error message that a volume can’t be ejected because it is in use.  Even though I don’t actively have anything being used on the share.  Today I got fed up with the error and decided to find a solution.

  • Application:  lsof – list open files
  • Usage:  lsof | grep sharename
  • Example lsof | grep files

This will return a list of open files on that share.  You can then close the application that is holding the file open by either using the “Activity Monitor” or issuing a kill -9 PID.

Credit:  http://www.macosxhints.com/article.php?story=20080615071312194

Leave a Reply

Your email address will not be published. Required fields are marked *