Re: Automated-backup script
From: Will Wesley (willwesleyccna_at_comblockcast.net)
Date: 05/12/04
- Next message: Charles Sullivan: "Re: question about how to join open source projects"
- Previous message: Daniel Lidstrom: "Re: Automated-backup script"
- In reply to: Daniel Lidstrom: "Re: Automated-backup script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 11 May 2004 16:19:08 -0600
Daniel Lidstrom wrote:
> If I knew how to write that script, it would already be done :-)
> My idea is the following:
> 1) download the backup file
> 2) find out what name it was given (by finding the latest modified file)
> 3) By name of file, I know what is the next-latest file (last
> character of file, if it is a digit, minus 1)
> 4) Compute checksums for both files.
> 5) If equal, remove latest file
> 6) Else, do nothing
>
> Anybody who is fluid with scripts that can help me?
> Thanks in advace.
>
Off the top of my head in ksh:
{ sum $file1;sum $file2; }|{ read cksum1 b; read cksum2 b;if (( cksum1 \
== cksum2 )); then `rm -F $file2`; fi; }
but tmtowtdi.
- Next message: Charles Sullivan: "Re: question about how to join open source projects"
- Previous message: Daniel Lidstrom: "Re: Automated-backup script"
- In reply to: Daniel Lidstrom: "Re: Automated-backup script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|