How read Squid Access log

Here is an example of what is logged in the date time field of my Squid Access log. (access.log)

1178695080.671
1178695081.065
1178695081.152

to Know the date and time of the log run the below mentioned commend on access.log file, it will display the date and time of the log recorded.

perl -pe 's/\d+/localtime($&)/e' access.log 

You can export the converted display on your screen to a file also by running below mentioned commend

perl -pe 's/\d+/localtime($&)/e' access.log > convertedlog.txt

Leave a Reply

Your email address will not be published. Required fields are marked *