On CentOS 6 Linux I use
date +%a in several cronjobs and scripts to generate logfile names like
myprog-Tue.txt and this works well for me since many years.
But now for one program I need to delete the previous logfiles, i.e. in my cronjob before I start my program and redirect its output to
myprog-Tue.txt, I'd like to delete the
This way I'd like to get the old logfiles out of my way, but still have 5-6 days of logfiles around.
So I have tried:
# date -v+1d +%a date: invalid option -- 'v' Try `date --help' for more information.
Does anybody know what's wrong here please?