Created
July 7, 2018 15:09
-
-
Save adrienjoly/28c3fc268e522e168dd16715488cb0e0 to your computer and use it in GitHub Desktop.
bash/shell command to generate a timestamp — handy to prefix backup and archive file names, so that they are sorted by date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TIMESTAMP="$(date +'%Y-%m-%d_%H-%M')" | |
# => e.g. TIMESTAMP="2018-05-26_09-20" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment