June 6, 201411 yr You can see if you have perl installed (you should since it comes on every linux distro I used) by typing perl -v Perl Script #!/usr/bin/perluse strict;use warnings;use Filesys::DiskSpace;my $dir = "/home";my ($fs_type, $fs_desc, $used, $avail, $fused, $favail) = df $dir;my $df_free = (($avail) / ($avail+$used)) * 100.0;my $out = sprintf("Disk space on $dir: %0.2fn",$df_free);print $out;
Create an account or sign in to comment