List of open files on a volume

in

A Useful and Interesting Terminal Command

System Message: WARNING/2 (<stdin>, line 2)

Title underline too short.

A Useful and Interesting Terminal Command
================================

lsof and fstat

lsof and fstat list open files. This can be very handy for overcoming the "Cannot eject disk X because it is in use" error.

Try:

fstat | grep volumeName

to get the list of files open on that volume.