-
ls 展示當前目錄的所有文件
-
ls -l 詳細展示
-
cd … 進入上級目錄
-
cd / 入根目錄
-
ls -l -a 顯示所有(含隱藏)
查找日誌文件中的指定字符串
sudo grep -2 -i '_clentIp' nohup.out
查找日誌文件中倒數2000行
sudo cat nohup.out|tail -n 2000
查找佔用指定端口的進程
netstat -tnlp|grep 18000
或者
ss -lntpd|grep 18000
查看所有進程
ps -A
殺死指定進程
kill -15 24954
信號量