用習慣了 netstat,突然要用 lsof 還有點不太適用,上網找了一下教學,才發現 lsof 真的比較強,值得大家試試
http://dmiessler.com/study/lsof/
An lsof Tutorial / Primer
http://dmiessler.com/study/lsof/
An lsof Tutorial / Primer
lsof
is the Linux/Unix über-tool. I use it
most for getting network connection related information from a system,
but that's just the beginning for this amazing and little-known
application. The tool is aptly called lsof because it "lists open files". And remember, in Unix just about everything (including a network socket) is a file.