How to convert unix timestamps in shell


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

$ date +%s

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