[X-Unix] General Scripting Question

Russell McGaha russellmcgaha at mac.com
Mon Apr 13 13:19:10 PDT 2009


Eric;
	I am a little sleep deprived today; but I wasn't meaning to imply I  
wanted someone to write it for me, I actually LIKE learning things  
like this.
	I fairly certain I could manage the last two parts, sending the  
email, and moving the files.  I'm at a loss on how to start checking  
the free space on a volume though.  Could you give me a nudge toward  
what command(s), might give me this type of info?

	Also; you've given me a hand before.  I, THINK, I thanked you for  
your help; if I didn't let me say that I did appreciate it greatly!

Russell

On Apr 13, 2009, at 2:43 PM, Eric F Crist wrote:

> 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
>
>
>
>
>
> _______________________________________________
> X-Unix mailing list
> X-Unix at listserver.themacintoshguy.com
> http://listserver.themacintoshguy.com/mailman/listinfo/x-unix



More information about the X-Unix mailing list