Find open files in a directory
Show all processes that have open files anywhere under /var/log
lsof +D /var/log
- tool
- lsof19 commands
More lsof commands
-
lsof | grep '(deleted)'Find files that were deleted but are still open in a process and still use disk space
-
ss -tlnpShow listening TCP ports with process names
-
ss -tanp | grep ESTABShow established TCP connections with process info
-
ss -ulnpList listening UDP ports with process names
-
ss -sPrint a socket summary grouped by state