How to convert unix timestamps in shell


#1

Getting current time as unix timestamp is so easy with date command’s %s format strings as below:

$ date +%s
1418855967

If you have an unix timestamp and you want to see in human readable form, you can convert with date as below:

$ date [email protected]
Thu Dec 18 00:39:27 EET 2014