[X-Unix] General Scripting Question

Eric F Crist ecrist at secure-computing.net
Mon Apr 13 12:43:04 PDT 2009


On Apr 13, 2009, at 2:37 PM, Russell McGaha wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Folks;
> 	I want to look into something I'm not even sure is possible.
> 	Here's the scenario; I have a script that backs up a directory  
> [archives it] with the date in the name, this script runs every  
> weekday.  What I want to do is; after making the archive, check the  
> available space on that drive, if it is under say 5GB, then check  
> the free space on a backup drive, and if the free space there is  
> over say 10GB move the oldest archives of the first drive onto the  
> second.  When both drives are too full, I want the script to send me  
> an email letting me know I need to clean the drives up.
> 	Anyone know if this is even possible??
>
>
> Russell

Sure, why not?  Which part doesn't seems possible?  Get a start and  
I'll be happy to help you reach the end result, but I"m not willing to  
do it for you.  If you're going to stick to shell scripts, you'll want  
to read man for the following:

* grep
* cut
* awk
* test

Again, get a start, and I'll be happy to help you from there!
---
Eric Crist







More information about the X-Unix mailing list