Filter last occurrence on file


filter last occurrence containing the DHCP string
tac /var/log/syslog | grep -m 1 'DHCP'

filter 3 lines between the last occurrence containing the err or warn string
tac /var/log/syslog | egrep -m 1 -C 3 'err|warn'

Monitoring response time with curl

   curl -s -o /dev/null -w "Conecction: %{time_connect}s | Start transfer: %{time_starttransfer}s | Total time: %{time_total}s\n" ...

Mais vistos