Skip to content

CCIE23050.com CCIE Network blog HTTP://1806971003

CCIE23050.com

  • Home
  • About Me
  • Contact Me

Grep

Posted on November 1, 2016 by admin

Here are some useful grep comands for getting through syslog.

cat or zcat if compressed.

| grep what_you_are_looking_for

| grep -v what_you_are_not_looking_for

| head -n 10 looks at first 10 lines

| tail -n 10 looks at the last 10 lines

Example:

$ cat 11.16.25.99.log | grep 12.16.299.61 | grep -v UDP | tail -n 1
Nov 30 23:15:48 172.16.254.73 %ASA-6-303013: Teardown TCP connection 381431635 for OUTSIDE:12.16.299.61/57827 to INSIDE:10.99.219.35/8721 duration 11:25:52 bytes 92483 Connection timeout

Posted in LinuxTagged Linux

Post navigation

Linux nc and telnet
Linux tap0 interface

Follow Me

  • YouTube
  • LinkedIn

Location

  • 10809 Executive Center Dr, Little Rock, AR 72211
Proudly powered by WordPress | Theme: micro, developed by DevriX.