How can you calculate the number of days since 1/1/1970? This is for updating the shadowLastChange attribute on OpenLDAP.
Is there a way to do this using the linux date command?
ring0 beat me by a few seconds, but the full command is:
This goes by UTC time. Result:
A quick check with WolframAlpha shows that this is the correct value.
You can divide the result by
E.g. in Bash
to display the number of days.