Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

lsof

List open files

Syntax

lsof [OPTION]...

Common Options

-iShow network files
-pFilter by PID
-uFilter by user
+dShow directory files
-cFilter by command name
-tOutput PID only
+DRecursive directory search
-nDo not resolve hostnames

Common Examples

lsof -i :80

Check port 80 process

lsof -p 1234

Files opened by PID

lsof /path/file

Who uses file

Related Commands

Related Tools

More Code & Dev Tools