> -----Original Message----- > From: shrike-list-admin@xxxxxxxxxx > [mailto:shrike-list-admin@xxxxxxxxxx] On Behalf Of Ed Greshko > Sent: Wednesday, October 15, 2003 1:40 AM > To: Shrike List > Subject: Re: Scripting Question > > > On Wed, 2003-10-15 at 07:38, Jake McHenry wrote: > > Hi everyone, > > > > I made up a script that backs up my mysql database into a > compressed > > file. What I want to do now it make it only keep the last 4 days, > > anything older than that it will delete, basically the same thing > > logrotate does. > > > > Is there a way for me to do this in a bash script? > > > > The files are named: sql_10142003.sql.gz > > Just curious.... > > Why couldn't you just have your script call "logrotate" with > your specific configuration file to do the compression and > control the number of files kept? > > Seems like it would be a bit less work... > > -- > "An opinion is like an asshole - everybody has one." > - Clint Eastwood as Harry Callahan, The Dead Pool - 1988. > > > -- > Shrike-list mailing list > Shrike-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/shrike> -list > I was thinking of doing that, and just add another logrotate in cron.daily. I might end up doing that, because the find command that I'm using only looks for files created on the 4th day. If for some reason the script doesn't run, then the files will build up. -- Shrike-list mailing list Shrike-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/shrike-list