Re: Space left script
Re: Space left script
- Subject: Re: Space left script
- From: Skylar Bohan <email@hidden>
- Date: Mon, 28 Jun 2004 21:09:13 -0700
On Jun 26, 2004, at 11:13 PM, John Baltutis wrote:
>
On 06/26/04, you wrote:
>
>
>
> Anyone have any idea on how to make a script that would generate a
>
> .txt
>
> file that says how much space is left on a hard drive? One that
>
> refreshes the text file with the size say every half hour. Maybe I
>
> have
>
> to make a script that checks the volume space, and then set it to a
>
> cron job. Any ideas?
>
>
>
>
Try this:
>
>
do shell script "df -k /"
>
set status to result
>
set answer to ("There are " & (((get word 11 of status) / 1000) as
>
integer) ,
>
& " MBs " & "of free space on the boot drive") as string
>
display dialog answer
>
>
Wrap it in a tell block that gets called every 30 minutes and you
>
should be
>
good to go. If you want the space in GBs, use this:
>
>
do shell script "df -h /"
>
set status to result
>
set answer to ("There are " & (get word 11 of status) & "Bs " & "of
>
free
>
space on the boot drive") as string
>
display dialog answer
>
It works thanks! But a couple things, number one, how do you script a
tell block that goes every 30 minutes? Also, I
want people to be able to view how much space is left on the server in a
.txt, how can I script it so that it creates a text file with the
answer?
Thanks a lot.
You have your fears which might become reality. And then you have
Godzilla which is reality.
-Godzilla, King of the Monsters
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.