Linux Shell 命令大全

来源:互联网 发布:玄空排盘软件手机版 编辑:程序博客网 时间:2024/06/03 20:21

监控JVM工具:https://www.cnblogs.com/lcword/p/5857686.html

linux系统信息查看命令大全:http://www.linuxidc.com/Linux/2012-07/66766.htm

linux命令查看大全:http://www.runoob.com/linux/linux-command-manual.html

常用命令:


man ls
info ls

jhat -help 

jstat -gcutil 16191 100000

jmap -histo:live 16191>d.txt

jstack 13750 | tee -a jstack.log  

top -H -p pid直接看线程cpu使用率


find ./scripts -name '*' |xargs grep '$app_name'

Linux:find 按文件修改时间查找文件[ find /opt/ctrip -type d -ctime -1]

sudo vim hosts

压缩 tar -zcvf constant.tar.gz constant/
解压 tar zxvf constant.tar.gz constant

rz + 拉文件: 文件上传
sz rebuild.log:日志下载


awk :
去重复
awk 'NR==FNR{a[$1]++}NR!=FNR&&++b[$1]==1{print $1,a[$1]}' a a
http://www.cnblogs.com/wangyuebo/p/5904581.html

awk:日志统计
grep '/search' engine.access.log.2016-09-05 | awk '{
countAll++;
if(($8)>50 && ($8)<61){count1++};
if(($8)>60 && ($8)<71){count2++};
if(($8)>70 && ($8)<81){count3++};
if(($8)>80 && ($8)<91){count4++};
if(($8)>90 && ($8)<101){count5++};

END {print "[51-60]ms:"count1/countAll*100"%\t" "[61-70]ms:"count2/countAll*100"%\t" "[71-80]ms:"count3/countAll*100"%\t" "[81-90]ms:"count4/countAll*100"%\t" "[91-100]ms:"count4/countAll*100"%\t" }'



rz + 拉文件: 文件上传
sz rebuild.log:日志下载
原创粉丝点击