List open files

This command lists regular files that are open by running processes:

lsof -n | grep REG

Or just grep for the file you are looking for:

lsof -n | grep $filename

You can also see what ports are open using lsof -i.

1 comment

Leave a comment

Your email address will not be published. Required fields are marked *