Update I forgot to answer the pure perl part of the question. The module Filesys::Df should be able to do what you want. From the synopsis:1042% df -k /dev/hda7 Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda7 9606556 7156344 1962216 79% / 1043% perl -e'print `df -k /dev/hda7`' Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda7 9606556 7156344 1962216 79% /
use Filesys::Df; my $ref = df("/tmp"); # Default block size of 1024 bytes. # You can specify a different block # as a second argument. print"Percent Full: $ref->{per}\n"; print"Total Blocks: $ref->{blocks}\n"; print"Blocks Available: $ref->{bavail}\n"; print"Blocks Used: $ref->{used}\n"; print"Inode Percent full: $ref->{fper}\n"; print"Inodes Free: $ref->{favail}\n"; print"Inodes Used: $ref->{fused}\n"; print"Total Bytes", ($ref->{blocks} * 1024), "\n";
-Mark
In reply to Re: Calculating Mount Point Capacity
by kvale
in thread Calculating Mount Point Capacity
by St. Catharine
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |