Working with dates and timestamps in GNU Linux

With the GNU date command line utility.

Print time as seconds from the epoch, or, “seconds since 1970-01-01 00:00:00 UTC” :

$ date +%s
1365439166

Convert timestamp or epoch dates into familiar day and time :

$ date --date='@1365439166'
Mon Apr 8 11:39:26 CDT 2013

Usage from GNU coreutils 8.x, and may work elsewhere.

Tags: , ,

Leave a Reply

You must be logged in to post a comment.