1、查日志常用命令
Ls(文件详情)
Cd(切换的) cd 切换目录、cd.. 返回上一级目录
Pwd(显示当前路径)
Mkdir(创建目录)
Touch(创建文件)
Rm(删除文件)
Cp(拷贝)
Mv(重命名)
clear(清屏)
wq(保存并退出)
find 搜索匹配条件的文件
1)、查日志定位到对应目录
cat xx.log
head -n 50 xx.log 头50行日志
tail -n 50 xx.log 后50行日志
tail -f xx.log 最新日志
2、进程
ps -ef |grep nmp-front 进程关键字
ps -aux| grep nmp-front 不显示本身进程
ps -aux| grep tomcat 查看端口号
ifconfig:查看网卡信息 (ifconfig 或 ifconfig | more)
ping:查看与某台机器的连接情况 (ping ip)
netstat -an:查看当前系统端口 (netstat -an)
搜索指定端口 (netstat -an | grep 8080)