lsof

Lists all open files and the processes that opened them

brewmacoslinux
Try with needOr install directly
Source

About

Utility to list open files

Commands

lsof

Examples

List all open files by a specific process$ lsof -p 1234
Find which process has a specific file open$ lsof /path/to/file
List all files open on a specific network port$ lsof -i :8080