Wednesday, November 30, 2016

How to print the epoch using date command

To print epoch - The seconds that has passed since 1970-01-01 00:00:00 UTC, run the following command,

date +"%s" 1480572641

Here %s tells date to print the epoch.



Tested on: CentOS 7, Debian 8, Ubuntu 16.04

No comments:

Post a Comment