Tony Esposito wrote: > Anyone have an idea about getting UNIX file system free space, used space, > total space numbers without having to resort to something like the > following ( which gets the percent of used space for a command-line > supplied file system name stored in the variable ${file_sys} ): > > $per_used = `df -k | grep " ${file_sys}\$" | awk '{print \$5}'`; >
try: #!/usr/bin/perl -w use strict; use Filesys::DiskFree; (my $disk = Filesys::DiskFree->new)->df; print "total: ",$disk->total('/'),"\n"; print "used: ",$disk->used('/'),"\n"; print "available: ",$disk->avail('/'),"\n"; __END__ prints: total: 8589885440 used: 4378312704 available: 3775221760 david -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]