Linux-grep search

(1) grep multi-criteria search:

    And Relationship: grep -n 'Condition 1' service.log | grep 'Condition 2' | grep 'Condition 3'

    Or relationship: grep -n service.log | grep 'condition 1 | Condition 2'

(2) grep search by time

    The relationship between the character and time conditions: grep -n 'XAPI / V1 / Contacts' service.log | grep '2019-09-27 14: 30:. 4 [0-9]'

 

    

Guess you like

Origin www.cnblogs.com/Booker808-java/p/11605661.html