access_log过滤


1.grep -w "/yun/organization/sharefile" access_log |grep -w "Qing" |grep -w "ticket"


  完全匹配  /yun/organization/sharefile 再匹配出 Qing ,再匹配出ticket


2.grep -w "/yun/organization/sharefile" access_log |grep -w "Qing" |grep -v "ticket"

  完全匹配  /yun/organization/sharefile 再匹配出 Qing ,过滤掉ticket


3.过滤查询最近的50行日志

grep "download" debug.log  |  tail  -50


4.过滤查询开头的50行日志

grep "download" debug.log  |  head  -50

你可能感兴趣的:(linux)