First page Back Continue Last page Overview Graphics

Don’t use a hammer

me@box:~$ tail -n1 httpd-access.log

46.229.168.85 - - [10/Jul/2018:18:15:21 -0400] "GET /presentations/2018-CLI-wizardry/img1.html HTTP/1.1" 200 655 "-" "Mozilla/5.0 (compatible; SemrushBot/2~bl; +http://www.semrush.com/bot.html)"

me@box:~$ egrep '46\.229\.168\.85' httpd-access.log | sed 's/.*\] "GET //' | sed 's/HTTP.*$//'

/presentations/2018-CLI-wizardry/img1.html

me@box:~$ awk ‘{print $1,$7}’ httpd-access.log | egrep ‘46\.229\.168\.85’

46.229.168.85 /presentations/2018-CLI-wizardry/img1.html

when you need to turn screws