Get today’s date and use it in filename

You can format the output using the '+FORMAT' parameter, e.g.

touch "log$(date +'%m%d%y')"

See the manpage for what sequences you can use in FORMAT.


Running the command

echo "myfilename-"`date +"%d-%m-%Y"`

gives this as the output:

myfilename-21-02-2014

One of the possible soultions:

date +log%y%m%d | xargs touch

creates log111017