Gentoo Archives: gentoo-user

From: michael@×××××××××××××.com
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:53:53
Message-Id: Pine.LNX.4.64.0511180048120.14423@mail.magrittesystems.com
In Reply to: Re: [gentoo-user] how to find if a program is using a particular /dev device? by John Myers
1 That was it. Thanks!
2 M
3
4
5 On Fri, 18 Nov 2005, John Myers wrote:
6
7 > On Thursday 17 November 2005 23:54, michael@×××××××××××××.com wrote:
8 >> I have a custom device driver in /dev/ that can only be used by one
9 >> program at a time. Since the device is /dev/ttyUSB0, I can see if anyone
10 >> is using it by:
11 >>
12 >> ls -l /proc/*/fd/* | grep ttyUSB0
13 >>
14 >> Is there a utility or other better way I can discover which process, or
15 >> better, which program, is using a particular device?
16 >>
17 >> Thanks,
18 >> Michael
19 > try lsof
20 >
21 --
22 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] how to find if a program is using a particular /dev device? Nick Rout <nick@×××××××.nz>