Last active
December 21, 2015 15:39
-
-
Save johnlaine1/6328421 to your computer and use it in GitHub Desktop.
Add the current date to a file in linux.
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
now=$(date +"%m_%d_%Y") | |
touch my_file_$now | |
# Will output something like my_file_08_20_2013 | |
# You can also do this, which will have the same results | |
touch my_file_$(date +"%m_%d_%Y") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment