xshell 命令
- tail -100f common-default.log 查看默认日志
- cat -n common-default.log | tail -n +3000 | head -1000
从第3000行开始,显示1000行。即显示3000~3999行
http://blog.csdn.net/jeikerxiao/article/details/77503479 - ctrl + z 暂停
- sz common-default.log 保存到本地
- tail -100f common-default.log|grep ‘退款’
- cat -n common-default.log |grep ‘退款’
- tac common-default.log|grep ‘订单数据为空,不推送大数据:’|wc -l 匹配关键字个数行
- 在文件a中统计 hello 出现的行数:
grep hello a | wc -l - 在文件a中统计hello出现的次数:
grep -o hello a | wc -l