[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



    Bob> Simple Perl question for the group - is there a Perl function
    Bob> that capture the space remaining on a mounted partition?

my $fs = "/foo";
my( $used, $avail, $pct ) =
  (split( /\s+/, `df -k $fs | tail -1` ))[-4,-3,-2];


Not to mention searching for df on search.cpan.org sez:


Filesys::DiskFree

Filesys::Df

Filesys::DiskSpace


Never used any of them personally.  YMMV.



-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch at phydeaux.org   |  Vincent, you should cease askin'          \ o.O'
                      |  scary questions." -- Jules                =(___)=
                      |                                               U


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00033" href="msg00033.html">[ale] Perl Question</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Chris Fowler)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00022" href="msg00022.html">[ale] Perl Question</a></strong>
<ul><li><em>From:</em> bkruger at mindspring.com (Bob Kruger)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00024.html">[ale] Price list</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00029.html">[ale] Kernel 2.6 config</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00022.html">[ale] Perl Question</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00033.html">[ale] Perl Question</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00025"><strong>Date</strong></a></li>
<li><a href="threads.html#00025"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>