menu

human-readable access log from the command line

Here are some quick notes about reading the last 100 entries of an access log without too much information:

cut -d' ' -f1,6,7,9 access.log | tail -n 100

looks like (IP Address, GET / POST / ???, URL, RESULT):

178.137.17.241 "GET /randompage/ 200
117.21.224.16 "GET / 200
178.33.122.126 "GET /mypage1/ 200
178.137.18.169 "GET /NotMyPage/ 404

Explanation:

cut: break by col,

-d: separator, in this case a space

-f: cols to be shown (you can experiment with this)

tail: show last -n, -n 100 will show last 100 lines.