Try
cp myfile.ext myfile.`date "+%Y-%m-%d"`.ext
and for the correct solution, first decompose the name into the base name and extension, assign a date and then reassemble for the final target name.
The key is that
date +FORMAT
allows you to use very rich format strings. See date --help or a fairly accurate guide.
source share