I checked many questions like my issue but could not find a solution yet
Following command works without any problem
rm -rf <PATH>/<pattern>*$(date +'%Y%m%d' -d "-2 days")*.csv
I have edited crontab with like following line
39 9 * * * rm -rf <PATH>/<pattern>*$(date +\'\%Y\%m\%d\' -d \"-2 days\")*.csv
But I got following error when crond runs my command
> date: extra operand `days"' Try `date --help' for more information.
I could not find any solution yet, do you have any idea ?
I have tons of file to delete, rm works better than find (-exec rm) command.