Append current date to the filename via Cron?

* * * * * echo "hello" > /tmp/helloFile_$(date +\%Y\%m\%d\%H\%M\%S).txt

You just need to escape the percent signs.

Other date formats: http://www.cyberciti.biz/faq/linux-unix-formatting-dates-for-display/


You should use `` instead of '' around the command you want to execute to generate the current date for your filename.


You must escape the format and use evaluation

mysqldump -u username -pPassword db_name > www/db_backup/db_backup_`date +\%d\%m\%y`.sql