In this Linux tip, we’re going to look at a command that allows you see how many days have passed since the beginning of the Linux epoch – Jan 1, 1970. To begin, we use the command below to display the number of seconds since the epoch began on Jan 1, 1970. This is how Linux stores dates and times. $ date +%s 1719337777To convert this number from the number of seconds to the number of days, you would do this: $ days=expr 1719337777 / 60 / 60 / 24 19899 This divides the number of seconds by the number of seconds per minute, minutes per hour and hours per day. And, if you’re not confident about the result, you can convert it to the number of years and see a number that is easier to confirm.$ expr 19899 / 36554
expr 1719337777 / 60 / 60 / 24
Register Now
Sponsored Links