What I did was for a similar thing was make a directory for each day. i.e
directories are 1,2,3,4,5 with 5 having the oldest information. I then
copied the contents of directory 4 to 5, 3 to 4 etc. By doing this I
did not have worry about deleting older files.
The name of the files have to be the same for this to work.
david
On Wed, 5 Jun 2002, Jesse Angell wrote:
> Here is my script
> #!/bin/sh
>
> instance=${1:-palace}
> root=${2:-/home/angeleyez/palaceserver}
> cp $root/$instance/psdata/pserver.pat $root/$instance/psdata/backup/pserver`date
>+%y%m%d`.pat
> cp $root/$instance/psdata/pserver.prefs $root/$instance/psdata/backup/pserver`date
>+%y%m%d`.prefs
>
> This script is ran daily. The one thing that I need to do is set it so after those
>are 5 days old the script deletes them. ( the backups) as it would become hectic
>after a few months.
> How do I have it delete the files that are 5 days old?
>
> --------------
> Jesse Angell
> PalaceUnlimited.com
> #1 Palace Host
>
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list