In Bash, how to convert an epoch timestamp to a human readable date format?
In Bash, you can use the date
command’s -d
option:
date -d @<your epoch>
Here @
specifies the epoch timestamp.
One example:
$ date -d @1490157520.05
Wed Mar 22 12:38:40 HKT 2017