1 min read 64 words Updated May 09, 2026 Created May 09, 2026

Fun with date

The date(1) command is capable of many things.

Convert an epoch (unix time) into something a human can make sense of

date --date='@2147483647'

Print yesterday's date. Handy for monthly cronjobs scheduled on day 1 but need to get the date of the last day prior month

date --date='1 day ago'
Wed Sep  2 11:01:35 PDT 2015