We are switching our logs daily and have created a cron job to automate this process. Recently, we added a few lines to the cron job to rename the "old.log" to the following format: M/D/Y-H/M. The line looks similar to this:
* * * * * mv /opt/pkg/FireWall-1*/log/old.log /var/test/logs/`date +"%m%d%y-%H%M"`.log
This command works properly when I am at the console, but when the cron job runs it does not work. I receive the following message in my inbox from root: "Syntax error: EOF in backquote substitution"
Can anyone please point me in the right direction of what I am missing or need to change in this cron job?
Thanks in advance. Joe
* * * * * mv /opt/pkg/FireWall-1*/log/old.log /var/test/logs/`date +"%m%d%y-%H%M"`.log
This command works properly when I am at the console, but when the cron job runs it does not work. I receive the following message in my inbox from root: "Syntax error: EOF in backquote substitution"
Can anyone please point me in the right direction of what I am missing or need to change in this cron job?
Thanks in advance. Joe