I run rsync
as a cron
job and display the last backup via conky
(i.e. "Last backup 2017 05 12 14:22:20"). I would like to display my last backup as "2 days ago" or "4 hours ago", rather than just displaying a static datestamp.
Is there any way to display a date/time using this sort of user-friendly output format? I've looked at man date
, but cannot find anything about outputting a date in this sort of format. I see how to query a relative time or date with the -d
flag, but cannot see how to get the output of date to include words like "yesterday", "3 days ago" etc.
Thanks!
date
,info date
has more in depth documentation thanman date
man date
is not very informative.man strftime
will explain the different formats available.