This blog is all about life of being a systems administrator, it highlights the achievements and hurdles of managing small to large systems running on Unix/Linux platforms.
Sunday, September 1, 2013
Unix Timestamp conversion (Convert Unix Time)
Have you ever had the chance to work on logs to investigate on a few items that needs immediate reports and judgement, while you are at it logs shows the standard "unix" convention. To spare you all this hardship use the following formatting on every known log you have.
perl -p -e 's/^([0-9]*)/"[".localtime($1)."]"/e'
I does all the magic for you.
e.g. tail -n 20000 /some_path_to_logs | (command above) | less