Convert squid.log timestamp to readable format

Squid log looks like this:

Tue May 21 07:32:33 2013     25 TCP_MISS/200 68240 GET - DIRECT/ image/jpeg

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

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

About tompos

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

Leave a Reply