// 递归搜索".properties"结尾的文件,并输出文件中字符串db
find . -name *.properties | xargs grep "db" --color
// 获取本机ip
ip=`ifconfig | grep inet | grep -v inet6 | grep -v 127 | sed 's/^[ \t]*//g' |cut -d ' ' -f2`
// 最大的前十个文件
du -a /var | sort -n -r | head -n 10
// 过滤含有find_products 或 find_catalog
grep -E "find_products|find_catalog" need.log
// 查看磁盘使用
df -lh
// 查看当前文件夹占用排行
du -m --max-depth=1 . | sort -nr
// 进程开启的线程数
pstree -p pid |wc -l
// 获取当前目录
work_path=$(dirname $(readlink -f $0))
echo $work_path
netstat -ano
netstat -ano | findstr 9000
tasklist | findstr 4144
taskkill -PID 4144 -F