linux命令

根据进程查询端口:

netstat -anp|grep pid

lsof -i | grep pid

根据端口查询进程

netstat -anp|grep port

根据进程查询应用目录:

ll /proc/pid

1.查看当前目录下的所有目录的大小(使用-h参数)
du -h
2.查看当前目录下的所有目录的大小(使用-m参数,已m为单位),并且使用sort -nr 从小到大排序
du -m|sort -nr

linux查看指定目录下最大的10个文件

du --max-depth=1 / -h |sort -h -r |head -10
 
 
原文地址:https://www.cnblogs.com/zshboke-2015/p/13965616.html