lsof
$ lsof [-p pid] [-d fd] [-u login/UID] [-g PGID] [filename]
List open files of a processes. This can mean actual files in the file system, sockets, pipes, etc.
--help
: Display help message and exit--version
: Print version-p pid
: Select by PID-d fd
: Select by file descriptor-u login/UID
: Select by login/UID-g PGID
: Select by process group IDfilename
: Filename