All apps/lsof

lsof

lsof

List open files.

Runs as lsof|macOS, Linux, Windows

Autocomplete

Fig spec, with what the manifest adds · 40 options
Published once and never changed; check the digest before caching
sha256
0357b68ca7f3d80b4c3c27ae56db3753f34461de560a903f7f6300e338183a10
Size
8010 bytes
OptionsOn lsof itself
-?-h--help
Help
-a
Apply AND to the selections (defaults to OR)
-b
Avoid kernel blocks
-c
Select the listing of files for processes executing a command <string or regexp (optional ending with /i /b /x)>
+c
COMMAND width (9) <number>
+d
Search for all open instances/files/directories of directory <file>
-d
Specify a list of file descriptors (FDs) to exclude from or include in the output listing <File descriptor number>
+D
Search tree for all open instances/files/directories of directory. *SLOW?* <file>
+f
Enable path name arguments to be interpreted <flags>
-f
Inhibit path name arguments to be interpreted <flags>
-F
Select fields to output <options>
-F?
Show fields for -F
-g
Exclude or select by process group IDs (PGID) <PGID>
-i
Selects files by [46][protocol][@hostname|hostaddr][:service|port] <options>
-l
Inhibit conversion of user IDs to login names
+L
Enable listing of file link counts <number>
-L
Disable listing of file link counts <number>
+M
Enable portMap registration
-M
Disable portMap registration
-n
No host names
-N
Select NFS files
-o
List file offset
-O
No overhead *RISKY*
-p
Exclude or select process identification numbers (PIDs) <PIDs>
-P
No port names
+r
Repeat every t seconds (15) until no files <time (seconds)>
-r
Repeat every t seconds (15) forever <time (seconds)>
-R
List parent PID
-s
List file size or exclude/select protocol <protocol:state>
-S
Stat timeout in seconds (lstat/readlink/stat) <timeout (seconds)>
-T
Disable TCP/TPI info <info>
-t
Specify terse listing
-u
Exclude/select login|UID set <UIDs>
-U
Select Unix socket
-v
List version info
-V
Verbose search
+w
Enable warnings
-w
Disable warnings
-x
Cross over +d|+D File systems or symbolic links <cross-over option>
-X
File descriptor table only
ArgumentsPositional, in order
<names>
Select named files or files on named file systems · optional · repeatable · folders