lsof
The lsof tool lists open files for a process and can display information about any files that are opened by processes currently running on the system. It can also list communications opened by each process. An open file can be a regular file, a directory, a block special file, a character special file, an executing text reference, a library, a stream or a network file (Internet socket, NFS file, or UNIX domain socket).