1.ps -ef|grep 进程号 JID查询
2.grep '关键字' log.log|grep '关键字' #更快更准定位日志
3. netstat -nultp #查看所有端口使用情况
4. netstat -anp |grep 82(端口号) #查看指定端口使用情况
5.vi模式下显示行数,编辑模式,
:set nu
:/world 从当前光标处,向上查找world关键字
:?world 从当前光标处,向后查找world关键字
G(大写): 移动到指定行,行号+G
6.查询主机上的定时任务
crontab -l
7. System-Monitor 查看当前进程。
8. ps aux | grep Z 查找僵尸进程
9. kill -s SIGCHLD pid 杀死僵尸进程
10.more /etc/hosts 查询hosts配置
11.service iptables status #检查防火墙是否关闭
12. service iptables stop 关闭防火墙
13.mv命令
mv old.txt new.txt 修改文件名称
mv src_file(文件) dest_directory(目录)
mv new.txt /data/tomcat/new2.txt 移动并重命名
14. ZooKeeper作为主从自动切换和元数据管理的中间件
./bin/zkServer.sh start(stop) ./conf/zoo.cfg ## 启停zk
##后期持续更新常用命令