杀死一个进程
❯Bash
pgrep -f <关键字> | xargs -L1 pkill -TERM -P查看各端口被哪些进程占用
❯Bash
netstat -tulnp # 如果不需要查看 UDP 连接可以去掉 `u`。需要 sudo 权限系统状态监控
❯Bash
sudo apt install bpytop
sudo bpytop查询某个文件夹所有文件的大小,深度为1,并按照从大到小排序
❯Bash
du -hd1 .cache | sort -hrpgrep -f <关键字> | xargs -L1 pkill -TERM -Pnetstat -tulnp # 如果不需要查看 UDP 连接可以去掉 `u`。需要 sudo 权限sudo apt install bpytop
sudo bpytop du -hd1 .cache | sort -hr