The stuff I do

Bash dates

← Notes

Tags: [bash][date]

All of these notes are about date from GNU coreutils on Linux. I believe some parameters are diferent on MacOS.

Everything in there is basically a rehash of man date.

Timestamp / Date conversions 🔗

date +"%s"  # Get current date as timestamp

alias ts2date='timestamp2date' # Parse timestamp as date
function timestamp2date {
echo $(date -d @$1)

← Notes

Back to top