How many minutes have passed since the Unix Epoch

date

How many minutes have passed since the Unix Epoch ? It should be January 1, 1970 ?

Let's say approximately until 1 Jan 2011… 5 865 696 000 minutes ?

Best Answer

#!/bin/bash

# Minutes since Epoch until now:
((minutes=$(date +%s)/60))

# Minutes since Epoch until Jan 1 2011:
((minutes=$(date -d 'Jan 1 2011' +%s)/60))
Related Question