<>查看日志文件的常用命令
tail -f fileName #实时查看 tail -f fileName|grep "save" #过滤--只显示匹配的行 tail -f
fileName|grep -v "save" #过滤--显示不匹配的行 cat fileName #查看文件 cat fileName|grep
"save" #过滤--只显示匹配的行 cat fileName|grep "save"|wc -l #统计匹配的行 cat fileName|grep -o
"cardSource\.*" #显示匹配正则的字段 cat fileName|grep -A 10 "save" #过滤--显示匹配的行后10行 cat
fileName|grep -B 10 "save" #过滤--显示匹配的行前10行 cat fileName|grep -C 10 "save"
#过滤--显示匹配的行前后10行 cat -n fileName #显示行数 sed -n '5,10p' fileName #显示第5行到第10行 more
fileName #分屏显示 more +10 fileName #从第10行开始分屏显示 less fileName
#打开文件后按G调到末尾,按f向前翻页,按b向后翻页。输入行号可跳转到从当前页开始的指定行。 less -N fileName #显示行号

技术
下载桌面版
GitHub
百度网盘(提取码:draw)
Gitee
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:766591547
关注微信