jane27 发表于 2016-12-26 10:32:55

NGINX日志统计命令

  cat answers.recipester.com | grep '20/Sep/2010' | grep '/problem-question-'| grep 'Googlebot' > answers_test.txt
  
cat www.recipester.org.log | grep '/solution-'| grep 'Googlebot' > www_test.txt
  
下面的命令可以统计文件行数
当前目录下:
wc -l *.c *.h
  当前目录及子目录:
find . -name *.c |xargs wc -l
find . -name *.cpp | xargs wc -l
find . -name *.h |xargs wc -l
页: [1]
查看完整版本: NGINX日志统计命令