Re: Space left script
Re: Space left script
- Subject: Re: Space left script
- From: Joe Klemmer <email@hidden>
- Date: Sat, 26 Jun 2004 20:33:18 -0400
- Organization: Unix System/Network Administrator & Ad Hoc Programmer
On Sat, 2004-06-26 at 04:49, Walter Ian Kaye 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?
>
>
This Unix command will display free space on the boot volume, in KiB:
>
>
df -k /
>
>
...among other things. How you parse depends on which other text
>
items you want out of the result, if any. You can use tail to skip
>
the column header line:
>
>
df -k / | tail -1
>
>
If it were me, I'd do it in Perl and call the perl script from
>
crontab. (Then you could have a prefs file telling the script where
>
to write the file.)
perl might be a little overkill for this. I'd probably use an awk
command wrapped in a shell script. But then again, I really like awk.
--
My UnKnown Blog
http://x-nc.blogspot.com/
_______________________________________________
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.