Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'easier yet is lsof' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
easier yet is lsof
Authored by: vipw on May 06, '01 06:20:05AM

lsof is much like fstat but will search from a path.

lsof /Volumes/ will list all the open files that are volume mounted.
both apps list the pid as well, making it easy to kill the process that has the file opened with
the kill program.

i'm not sure if you need the developer tools to have lsof, i don't have access to a machine without them.



[ Reply to This | # ]
easier yet is lsof
Authored by: Groucho on May 07, '01 01:51:39AM

The disk-in-use-can't-eject problem seems to be a bug, and always seems to come down to Classic. The simplest solution until it's fixed is simply to quit or restart Classic. If it's not running, you can eject anything.



[ Reply to This | # ]
easier yet is lsof
Authored by: RandyMan on Apr 26, '02 12:08:41PM

I have the same problem after I run a Java application that lives on the volume I'm trying to unmount. The application itself is gone, but Java seems to be preventing me from unmounting the drive.



[ Reply to This | # ]
easier yet is lsof
Authored by: Anonymous on May 21, '01 04:49:50AM

Whenever is use lsof, i get a warning that says compiled for darwin 1.0, current version is 1.3.3. Is there a way to recompile this, or should i just not worry about it?



[ Reply to This | # ]
easier yet is lsof
Authored by: garbanzito on Apr 26, '02 06:35:38PM
hmmm...

i currently have a disk image which won't unmount. Classic is not runnng. fstat lists the volume twice, but the associated process is coreservicesd, not something i think i should be killing.

lsof /Volumes/ doesn't show anything at all. lsof with no arguments shows an hdid process has the dmg file open, but doesn't have an entry for the mounted volume.

in short, none of these hints seems to cover my current situation. i run into this very frequently and have been using the little utility "RealEject X", which probably is just doing "hdiutil eject -force".

i'm very comfortable force ejecting disk images and CDs because i don't/can't write to these volumes, so any open files will not have buffers needing to be flushed.

[ Reply to This | # ]
Quick Fix
Authored by: Rampico on Jul 23, '02 01:26:52PM

Same problem here. I've found that after the "unable to eject" message, if I relaunch the Finder, I can eject the disk.



[ Reply to This | # ]
easier yet is lsof
Authored by: pecosbill on Dec 22, '05 10:50:56PM
I couldn't get lsof to work either (on 10.4!!!!!! When is Apple going to report this!?!?!) until I did

lsof | grep Much
where Much is a part of the disk name (case sensitive) that I want to eject. I could not get lsof to work by putting the volume path as a parameter. There is a way to tell those apps to quit in one command line though it's likely best to do it manually. (Check the huge man page examples if you want to give it a try. It involves running lsof inside a ` (back-accent)

---
Pecos Bill

[ Reply to This | # ]