trace which user process has the handle on a file or folder lsof /path/to/folder/or/file Get details of which service uses a port lsof -i: