Unix Time
noun
say it: “YOO-niks TYM” /ˈjunɪks ˈtaɪm/
Time counted as the number of seconds since the first moment of 1970, in UTC, kept as one whole number.
What is Unix time?
Unix time is how computers keep time: one number, the seconds since the first moment of 1970. date +%s prints it. People can't read it at a glance, but arithmetic works on it directly, so a script takes one reading from another to time a job. It's also called a timestamp.
start=$(date +%s) # such as 1794225600
sleep 3
end=$(date +%s)
echo "That took $((end - start)) seconds" # That took 3 seconds
In a sentence
- “date +%s printed the Unix time, a ten-digit number.”
- “Sam took one Unix time reading from another to see how long the backup took.”
Level: Journeyman · More Unix terms at this level
Updated