cat -n /opt/tomcat/logs/catalina.out |grep "property.cooperationResident.savebindCustomerHouse" |more
grep -20 'property.cooperationResident.savebindCustomerHouse' /opt/tomcat/logs/catalina.out
tail -f /opt/tomcat/logs/catalina.out | grep "com.agile.base.push" -i
匹配的字符串显示
grep -20 'property.cooperationResident.savebindCustomerHouse' /opt/tomcat/logs/catalina.out
//打印匹配行的前后20行
grep -A 20 'property.cooperationResident.savebindCustomerHouse' /opt/tomcat/logs/catalina.out//打印匹配行的后20行
grep -B 20 'property.cooperationResident.savebindCustomerHouse' /opt/tomcat/logs/catalina.out
//打印匹配行的前20行
本文介绍了如何使用grep命令在Tomcat的日志文件中搜索特定的字符串,包括如何查看匹配的字符串、打印匹配行及其前后文等技巧。
6818

被折叠的 条评论
为什么被折叠?



