Format/result | Command | Output ——————————+—————————-+—————————— YY-MM-DD_hh:mm:ss | date +%F_%T | $(date +%F_%T) YYMMDD_hhmmss | date +%Y%m%d_%H%M%S | $(date +%Y%m%d_%H%M%S) YYMMDD_hhmmss (UTC version) | date –utc +%Y%m%d_%H%M%SZ | $(date –utc +%Y%m%d_%H%M%SZ) YYMMDD_hhmmss (with local TZ) | date +%Y%m%d_%H%M%S%Z | $(date +%Y%m%d_%H%M%S%Z) YYMMDDhhmmss | date +%Y%m%d%H%M%S | $(date +%Y%m%d%H%M%S) YYMMDDhhmmssnnnnnnnnn | date +%Y%m%d%H%M%S%N | $(date…
Bash Datestamps
Posted on