Cheatsheet
I'm not googling that again
The flags used for the date command are a bit different depending on whether you're using GNUs or *BSD versions of
it. For practical purposes, you can see this Linux or macOS.
# Get the current date in format YYYY-MM-dd
date +%F # 2023-04-06
# Get the current date in epoch seconds
date +%s # 1680792138
# Convert epoch seconds into a human-readable date
date -d @1680792138 # jue 06 abr 2023 16:42:18 CEST
# Convert epoch seconds into YYYY-MM-dd
date -d @1680792138 +%F
# Convert epoch seconds into a human-readable date
date -r 1680792138 # jue 06 abr 2023 16:42:18 CEST
# Convert epoch seconds into YYYY-MM-dd
date -r 1680792138 +%F