ministry has asked for the wisdom of the Perl Monks concerning the following question:
What is going to be the easiest way to find out how much disk space capacity has been utilized on a particular slice? For example, when I attempted this in a shell script, my syntax was as follows (to find the root partitions capacity):
SLICE1=`/bin/df -k|/bin/egrep "/^"|/bin/awk '{print $5}'`
Here I just used the output of a /bin/df -k and printed out the one value I was looking for. Should I simply pipe a df -k from the shell into my perl script, and trim up the output a bit, or is there a better way?
Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: disk space utilization
by saintmike (Vicar) on Apr 08, 2005 at 20:06 UTC | |
Re: disk space utilization
by xorl (Deacon) on Apr 08, 2005 at 19:53 UTC | |
Re: disk space utilization
by ambrus (Abbot) on Apr 08, 2005 at 20:08 UTC | |
Re: disk space utilization
by gam3 (Curate) on Apr 08, 2005 at 20:18 UTC | |
Re: disk space utilization
by sh1tn (Priest) on Apr 08, 2005 at 19:41 UTC | |
by graff (Chancellor) on Apr 09, 2005 at 05:16 UTC | |
by ministry (Scribe) on Apr 12, 2005 at 15:49 UTC | |
by graff (Chancellor) on Apr 14, 2005 at 03:34 UTC |
Back to
Seekers of Perl Wisdom