excess files

Jean-David Beyer jdbeyer@exit109.com
Fri, 19 Oct 2001 08:41:02 -0400


Rob Brown-Bayliss wrote:
> 
> > So you could thow them all away.  However you may want to keep at least the latest
> > just in case the inpossable happens and the working file gets corrupted.
> >
> 
> I have a small shell script, which is run before I use gnucash which
> deletes all files in the directory older than a specific number of
> days.  It's attached, but it's not my fault if you run it as root and
> loose everything :o)
> 

I have a small shell script, which is run everyday by cron, that I
posted some time ago, and I will not post again unless requested. It
acts a little differently. My script removes all files a week older than
the current (JeanDavid) file. I.e., it returns the current file and a
week's previous .log and .xac files.

The reason I did not return only files newer that a certain number of
days is that if I were away longer than that, all files would be
deleted. I imagine if this happens to someone using your script, if they
were away too long, they would have to remember to do something special
to save their file before running GnuCash or it would delete your "too
old" master file.

-- 
 .~.  Jean-David Beyer           Registered Linux User 85642.
 /V\                             Registered Machine    73926.
/( )\ Shrewsbury, New Jersey     http://counter.li.org 
^^-^^ 8:30am up 29 days, 15:24, 3 users, load average: 3.04, 3.07, 2.98