Last active
February 20, 2020 01:16
-
-
Save otkrsk/6d2405590a6d8170d582382b0ee9db27 to your computer and use it in GitHub Desktop.
Insert a Date Time Stamp Into a File and Append a Date Time Stamp to a Filename (in MacOS).
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
# insert the date into the file | |
date "+ %Y-%m-%d %H:%M:%S %z" >> filename.fileext | |
# append the date into the file | |
mv filename.fileext $(date +"%Y-%m-%d")_filename.fileext |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment