E-Mail:
Get our new Windows 7 eBook (PDF) for $7 with 70+ Tips. Download Now!

How do I customize a script from “Wicked Cool Shell Scripts”?

  • No Related Post

Regarding script #41 (calculating available disk space), out of your book Wicked Cool Shell Scripts, I am unclear how I can have this script calculate the free space on one specific drive, namely /Volumes/Documents HD in my case.

I’d also love to know how I can automatically email the results of this same script, say every 24 hours. If you could kindly point me in the right direction, I’m sure I could figure out the rest!

This is a fairly straightforward script you’ve asked about, so this will be an easy explanation.

The most important line in the diskspace script is:

df -k | awk -f $tempfile

Let’s just run a quick df -k so you can see the output in question…

What Do You Think?

 
35 queries / 0.315 seconds.