![]() |
|
XP is just a number | |
PerlMonks |
disk space utilizationby ministry (Scribe) |
on Apr 08, 2005 at 19:15 UTC ( #446123=perlquestion: print w/replies, xml ) | Need Help?? |
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.
Back to
Seekers of Perl Wisdom
|
|