命令神器:lsof 常用

來源:互聯網
上載者:User

標籤:

lsof -i 顯示所有網路連接
lsof -i 6擷取IPv6資訊
lsof -itcp顯示tcp串連
lsof -i:80顯示指定連接埠資訊
lsof [email protected]顯示指定ip串連
lsof [email protected]:22顯示指定主機對應連接埠資訊
lsof -i -stcp:LISTEN
lsof -i|grep ‘LISTEN‘顯示正等候串連連接埠
lsof -i stcp:ESTABLISHED顯示已串連
lsof -u root 顯示指定使用者開啟
lsof -u ^root 顯示指定使用者以外開啟
kill -9 `lsof -t -u root`殺死指定使用者一做的一切
lsof -p 80 查看知道進程ID開啟內容
lsof -c nginx 查看指定命令使用的檔案和網路連接
lsof -t -c nginx 只返回PID
lsof /home 顯示指定目錄互動
lsof -u root [email protected] 顯示使用者串連到指定ip
kill -HUP `lsof -t -c sshd` 給指定進程發HUP訊號
lsof +L1 顯示所有開啟串連數小於1的檔案
lsof [email protected]:80-10000

命令神器:lsof 常用

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.