How do I do this in bash ??
Hi all ...
I am writting a weekly automated backup script, very simple .. tars a
directory called 'myfiles' to a second hard drive.
Works AOK except I want the name of the file written by tar to be the time
and date. So I get a list of tared dated backups
I know 'date' gives me exactly what I want but I cant figure out how to get
tar to write a file with the value of date as its file name ...
# Backup entire 'myfiles/' directory, name it with the date.
tar -czf /mnt/archive/autoarchive/date myfiles
I put this in /etc/cron.weekly and I get a file called date !!???
I have tried '' and "" all to no avail
Any hints ??