LSOF

From The System Administrator Zone

LSOF is a Unix-specific diagnostic tool. Its name stands for LiSt Open Files, and it does just that. It lists information about any files that are open by processes currently running on the system. It can also list communications open by each process.

[root /etc]# lsof /var
COMMAND     PID   USER   FD   TYPE DEVICE SIZE/OFF   NODE NAME
cryptoran   186   root  txt   VREG   85,3    26680 201645 /var (/dev/md/dsk/d3)
syslogd     299   root    5w  VREG   85,3   197526  22414 /var/adm/messages
syslogd     299   root    7w  VREG   85,3    68201  78419 /var/log/syslog
syslogd     299   root    9w  VREG   85,3   197526  22414 /var/adm/messages
syslogd     299   root   10w  VREG   85,3  3456678  78429 /var/log/lpr
[snip]

Vic Abell's Home Page: The author of LSOF.

Sam Nelson's PCP script, is an alternative to "lsof -i" for Solaris.