To retrieve the name of the day, use something like:
(days like "Sunday", "Monday", etc).
or
(for days like "Sun", "Mon", etc)
Alternatively, you could create backups with full dates in the filenames. This allows you to store
more backups that just one week's worth.
For that, you can use:
Code:
today=`date +%Y%m%d`
In your shell script, you first put that command and then the tar command, using ${today} where you want to put the date in the name of the tar-file.