UNIX epoch conversion
From Brandonhutchinson.com
(Difference between revisions)
(New page: === Days since the UNIX epoch === Return the number of days since the UNIX epoch using ''perl'': $ '''perl -e 'printf qq{%d\n},time/86400'''' === Convert ''/etc/shadow'' ''lastchg'' to ...) |
m (Unix epoch conversion moved to UNIX epoch conversion) |
Current revision
Days since the UNIX epoch
Return the number of days since the UNIX epoch using perl:
$ perl -e 'printf qq{%d\n},time/86400'
Convert /etc/shadow lastchg to date
Convert the lastchg field in /etc/shadow to a date using GNU date:
$ date -d "1 January 1970 + lastchg days"
