Featured image of post 常用命令

常用命令

一些常用命令速记

Java

JVM

Command Note
jmap -heap Print java heap summary
jmap -dump:format=b,file= dump java heap
jstat -gcutil Displays a summary about garbage collection statistics.

Maven

Command Note
mvn dependency:tree View MVN Dependency Tree

Bash

Command Note
find . -type f -exec grep -l xxx {} \; 关键字搜索当前目录所有文件
netstat -ntp | awk ‘{if ($NF == “12345” && $6 == “CLOSE_WAIT”) print $0}’ | wc -l 统计某进程 CLOSE_WAIT TCP 数量
信息
find -exec 后面跟命令,需使用 ; 分号表示结束, {} 表示查找到的文件名