Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save CouldBeThis/951bda481657cb2ea5759cd4e9cc8487 to your computer and use it in GitHub Desktop.
Save CouldBeThis/951bda481657cb2ea5759cd4e9cc8487 to your computer and use it in GitHub Desktop.
how to create a file with YYY-MM-DD set in the filename
touch "$(date +%F) filename.txt"

creates file named 2021-12-06 filename.txt

touch "$(date) filename.txt"

creates file names Mon Dec 6 20:38:53 EST 2021 filename.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment