In Linux, you can use the command line tools "grep" and "wc" to count the number of occurrences in the file
#For example, the number of occurrences of the error keyword in the statistical file api_error.log
grep -o 'error' /www/payment/runtime/logs/api_error.log | wc -l
Post comment 取消回复