Skip to content

Instantly share code, notes, and snippets.

@johnlaine1
Last active December 21, 2015 15:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnlaine1/6328421 to your computer and use it in GitHub Desktop.
Save johnlaine1/6328421 to your computer and use it in GitHub Desktop.
Add the current date to a file in linux.
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