![]() Grep -i smtp /var/log/zimbra.log | grep -ioE 'to=.*status=.* ' | head -5 Very useful with you combine with the -E option and are looking for uniform log events and want to discard unnecessary info without doing/knowing sed or awk. Print only the matched (non-empty) parts of a matching line, with each part on a separate output line. Grep -iE user1 /var/log/zimbra.log | grep user2 Grep -iE 'user1.*user2|user2.*user1' /var/log/zimbra.log Grep -iE 'user1.*user2' /var/log/zimbra.log Match happens left to right with first variable and then second : Grep -iEvn -A3 -color 'info|warn' mailbox.logĪND match. If your terminal shows colors, this is useful in seeing where the match is in the output : NOT, Negative or invert matching, any line that DOES NOT have info or warn: ![]() OR or extended regexp operator, any line that has fatal or error : n - when in search mode, will goto next match./term search for "term" and goto in file.R replace and continue replacing to right.arrow keys - moves the "cursor" location up/down, left/right.Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.Ījcody - Need a general introduction of the course for the trainer to start with.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |