From: Charles Mills Date: 2004-08-25T05:05:49+09:00 Subject: Re: Find the number of open files On Aug 24, 2004, at 1:00 PM, Ara.T.Howard@noaa.gov wrote: > On Wed, 25 Aug 2004, Charles Mills wrote: > >> Is there an easy way to find out the number of open files held by a >> process (using C or Ruby)? >> -Charlie > > *nix only, but > > man lsof > man fuser > > -a Thanks for the suggestion. I guess another way to do it would be to walk all the valid file descriptors and call fstat() on them, checking for EBADF. I was hoping there would a system call / library function that would do this for me. -Charlie