UNPKG

311 BMarkdownView Raw
1# lsof
2
3> Lists open files and the corresponding processes
4
5- find the processes that have a given file open
6
7`lsof {{/path/to/file}}`
8
9- find the process that opened a local internet port
10
11`lsof -i :{{8080}}`
12
13- only output the process PID (e.g. to pipe into kill)
14
15`lsof -t {{/path/to/file}} | xargs kill -9`