[clug] Finding processes by working directory

Tony Breeds tony at bakeyournoodle.com
Mon Apr 5 04:46:41 GMT 2004


On Mon, Apr 05, 2004 at 02:47:59PM +1000, Darren Freeman wrote:
> Hi all,
> 
> I am often frustrated by trying to unmount a partition and being told
> it's in use.
> 
> How do I hunt down the offending process?

use fuser

---
tony at balder:~$ umount /cdrom 
umount: /cdrom: device is busy
umount: /cdrom: device is busy
tony at balder:~$ fuser -m /cdrom
/cdrom:               6564c
tony at balder:~$ fuser -vm /cdrom

                     USER        PID ACCESS COMMAND
/cdrom               tony       6564 ..c..  bash
tony at balder:~$ kill -9 6564
tony at balder:~$ fuser -vm /cdrom
tony at balder:~$ umount /cdrom
---

Yours Tony

        linux.conf.au       http://lca2005.linux.org.au/
	Apr 18-23 2005      The Australian Linux Technical Conference!



More information about the linux mailing list