Linux 常用命令

top      //动态监视
c      //详细进程
ctrl -z   //退出

ps -aux|grep 2114   //查看某进程的状态
ps -aux|grep resin
ps -aux|grep resin-5
netstat -anp|grep 28986    //查看某进程
netstat -anp|grep 28986|grep 3306    // 查看某进程的数据库连接数量

netstat -anp|grep 3306  //数据库连接数, //查看所有3306端口使用情况
netstat -ntlp   //查看当前所有tcp端口
 
netstat -ntulp |grep 80   //查看所有80端口使用情况
 
netstat -tunlp|grep 查看端口被那些进程占用 
 
nethogs: 按进程查看流量占用
iptraf-ng 网络流量监控工具
atop 系统监控


netstat -anp|grep 3306|grep ESTABLISHED

netstat -anp|grep 3306|grep ESTABLISHED|grep 1163


重启服务器:reboot


批量删除文件:通配符删除
删除文件:rm -f *2018-08-04*  
删除文件夹:rm -rf *2018-08-04*

  

原文地址:https://www.cnblogs.com/fxd980519/p/9540393.html