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