Thou spake:
<snip>
>At work, I keep 7 days worth of backups, and use the day of the week
>in the name. That way, it's easy to tell what backup was made on which
>day. If you really only want three, then you could do some math using
>the time since epoch in seconds divided by 86400 modulus 3 plus 1:
>
>$ echo Backup_0$(((`date +%s`/86400)%3+1)).tgz
>Backup_02.tgz
>
>Andy Johnson
As usual, there's more than one way to do it. I also had trouble making tar
do numbered backups, so here's what I wrote using command substitutions:
tar -zcf /path/to/archive.`date +%Y%m%d`.tgz /path/to/directory
-- Joey Kelly < Minister of the Gospel | Linux Consultant > http://joeykelly.net ___________________ Nolug mailing list nolug@nolug.orgReceived on 12/14/03
This archive was generated by hypermail 2.2.0 : 12/19/08 EST