All apps/lsof

lsof

lsof

List open files.

Runs as lsof|macOS, Linux, Windows

Command form

ai-draft · 2 tasks · 10 fields

Select open files by process, user, command or network address. Field output, repeat mode and NFS options are left out.

Opens the form; the finished command lands at your prompt, unrun
otty gui lsof
List open filesExample values, fixed in this page — nothing here reaches a terminal
Basic
Network files (-i)*
string
No host name lookup
-n
No port name lookup
-P
TasksEach one presets the form for one job
Who is using a port
networkno_hostsno_ports
Files opened by a process
pidsno_hostsno_ports
ParametersOnly these flags are editable in the form
Network files (-i)
Address as [46][protocol][@host][:port], for example :8080 or TCP@localhost. Leave unset for all network files.
string
-i
Process IDs
Comma-separated PIDs; prefix with ^ to exclude.
string
-p
Users
Comma-separated login names or UIDs.
string
-u
Command name prefix
string
-c
AND the selections (default is OR)
boolean
-a
No host name lookup
boolean
-n
No port name lookup
boolean
-P
Terse output (PIDs only)
boolean
-t
Unix sockets only
boolean
-U
Files or directories
path · positional 0 · repeatable
SourcesEvery flag above is checked against these
fig
completion

github.com

Before it fills your prompt, Otty checks the installed lsof against its version. A form that does not match your version is not offered.