If on solaris, the standard distribution should have fuser [as jamisar has mentioned].
If on other OS, try to get 'lsof'
NAME
lsof - list open files
DESCRIPTION
Lsof revision 4.50 lists information about files opened by
processes for the following UNIX dialects:
AIX 4.1.[45], 4.2[.1], and 4.3[.123]
BSDI BSD/OS 2.1, 3.[01], and 4.[01] for Intel-based systems
DC/OSx 1.1 for Pyramid systems
DEC OSF/1, Digital UNIX, Tru64 UNIX 2.0, 3.2, 4.0, and 5.0
FreeBSD 2.1.[67], 2.2[.x], 3.[012345], 4.0, and 5.0 for Intel-
based systems
HP-UX 9.01, 10.20, and 11.00
Linux 2.0.3[2346], 2.1.x, and 2.2.x for Intel-based systems
NetBSD 1.[2345] for Alpha, Intel, and SPARC-based systems
NEXTSTEP 3.[13] for NEXTSTEP architectures
OpenBSD 2.[01234567] for Intel-based systems
OpenStep 4.x
Reliant UNIX 5.4[34] for Pyramid systems
SCO OpenServer Release 3.0 and 5.0.[0245] for Intel-based
systems
SCO UnixWare 2.1.[123] and 7[[.0].1] for Intel-based systems
Sequent PTX 2.1.9, 4.2.[13], 4.[34], 4.4[.1246], and 4.5[.1]
for Sequent systems
Solaris 2.5.1, 2.6, 7, 8 BETA, and 8 BETA-Refresh
SunOS 4.1.x
Ultrix 4.2
DISTRIBUTION
The latest distribution of lsof is available via anonymous
ftp from the host vic.cc.purdue.edu. You'll find the lsof
distribution in the pub/tools/unix/lsof directory.
Lsof is also mirrored elsewhere. When you access
vic.cc.purdue.edu and change to its pub/tools/unix/lsof
directory, you'll be given a list of some mirror sites. The
pub/tools/unix/lsof directory also contains a more complete
list in its mirrors file. Use mirrors with caution - not
all mirrors always have the latest lsof revision.
Some pre-compiled Lsof executables are available on
vic.cc.purdue.edu, but their use is discouraged - it's
better that you build your own from the sources. If you
feel you must use a pre-compiled executable, please read the
cautions that appear in the README files of the
pub/tools/unix/lsof/binaries subdirectories and in the 00*
files of the distribution.
vlad
+---------------------------+
|#include<disclaimer.h> |
+---------------------------+