Convert squid.log timestamp to readable format

Squid log looks like this:

Tue May 21 07:32:33 2013     25 10.0.1.63 TCP_MISS/200 68240 GET http://www.olcsobabakocsi.com/imagebrowser/ib_p010_0_66.jpg - DIRECT/212.108.200.61 image/jpeg

Use this one-liner to convert unix timestamp to readable dates:

#!/usr/bin/perl -p
s/^\d+\.\d+/localtime $&/e;
avatar

About tompos

Hungary, Budapest
This entry was posted in IT, Linux. Bookmark the permalink.

Leave a Reply