Xref: utzoo comp.unix.admin:1523 comp.unix.questions:30149 comp.unix.wizards:24712 Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!execu!sequoia!rpp386!jfh From: jfh@rpp386.cactus.org (John F Haugh II) Newsgroups: comp.unix.admin,comp.unix.questions,comp.unix.wizards Subject: Re: How can you tell who has what files open? Message-ID: <19168@rpp386.cactus.org> Date: 7 Apr 91 20:17:36 GMT References: <1991Apr04.201719.3587@ka3ovk> Reply-To: jfh@rpp386.cactus.org (John F Haugh II) Organization: Lone Star Cafe and BBS Service Lines: 18 X-Clever-Slogan: Recycle or Die. In article <1991Apr04.201719.3587@ka3ovk> albers@ka3ovk.irs.gov.UUCP (Jon Albers) writes: >Is there a way to find out the process id of a process that has a file open? >Is there a way to list open files by process id, name, and/or inode? I >want to be able to find out where the error starts. Two commands will tell you has a file open - "fuser" and "ofiles". "fuser" is standard with System V. "ofiles" I believe is mostly a SunOS command, I'm sure someone from that universe can fill you in. You might also want to look into the "crash" command, particularly the "user" subcommand. It will tell you about open files per process. You can then determine the files each process has open by going from the open file descriptor information to the file table to the inode table. -- John F. Haugh II | Distribution to | UUCP: ...!cs.utexas.edu!rpp386!jfh Ma Bell: (512) 832-8832 | GEnie PROHIBITED :-) | Domain: jfh@rpp386.cactus.org "If liberals interpreted the 2nd Amendment the same way they interpret the rest of the Constitution, gun ownership would be mandatory."