cheat-fork-echo/cheat/cheatsheets/date
2016-04-27 10:57:44 +08:00

9 lines
200 B
Plaintext

# Print date in format suitable for affixing to file names
date +"%Y%m%d_%H%M%S"
# Convert Unix timestamp to Date(Linux)
date -d @1440359821
# Convert Unix timestamp to Date(Mac)
date -r 1440359821