From: | John Myers <electronerd@×××××××××××××.net> | ||
---|---|---|---|
To: | gentoo-user@l.g.o | ||
Subject: | Re: [gentoo-user] how to find if a program is using a particular /dev device? | ||
Date: | Fri, 18 Nov 2005 08:24:02 | ||
Message-Id: | 200511180019.36886.electronerd@electronerdia.net | ||
In Reply to: | [gentoo-user] how to find if a program is using a particular /dev device? by michael@michaelshiloh.com |
1 | On Thursday 17 November 2005 23:54, michael@×××××××××××××.com wrote: |
2 | > I have a custom device driver in /dev/ that can only be used by one |
3 | > program at a time. Since the device is /dev/ttyUSB0, I can see if anyone |
4 | > is using it by: |
5 | > |
6 | > ls -l /proc/*/fd/* | grep ttyUSB0 |
7 | > |
8 | > Is there a utility or other better way I can discover which process, or |
9 | > better, which program, is using a particular device? |
10 | > |
11 | > Thanks, |
12 | > Michael |
13 | try lsof |
Subject | Author |
---|---|
Re: [gentoo-user] how to find if a program is using a particular /dev device? | michael@×××××××××××××.com |