lsof
-b // avoid blocking operation
Show files in /mnt that are opened:
lsof /mnt
Show files opened by particular process:
lsof -p 1234,1235,1236
Show listened ports:
lsof -i -nP
lsof -i tcp:23
List open socket without lookups on hostname and services:
lsof -i -nP tcp:80
Show files opened by given user:
lsof -u username
List processes that has this file open:
lsof /path/to/file
List open files for matching processes:
lsof -c command
page_revision: 1, last_edited: 1227277844|%e %b %Y, %H:%M %Z (%O ago)





