Fajar Priyanto wrote:
Hi all, I want to automate backup process into crontab. What I usually manually do is: tar zcvf filename-date.tar.gz /somedirectoryCan anyone help me with the script needed that can include the date in the filename?Thanks.
Well just assign date to something and then use it. Like: OLDFILE = 'myfile.gz' TODAY = `date +%F` NEWFILE = $TODAY-$OLDFILE mv $OLDFILE $NEWFILE Cheers, Mike