NAME
Tie::DiskUsage - Tie disk-usage to an hash
SYNOPSIS
require Tie::DiskUsage;
tie %usage, 'Tie::DiskUsage', '/var', '-h';
print $usage{'/var/log'};
untie %usage;
DESCRIPTION
Tie::DiskUsage ties the disk-usage, which is gathered from the output of du
, to an hash. If the path to perform the du-command on is being omitted, the current working directory will be examined; optional arguments to du
may be passed subsequently.
By default the location of the du-command is to be assumed in /usr/bin/du; if du
cannot be found to exist there, File::Which
will attempt to gather its former location.
The default path to du
may be overriden by setting $Tie::DiskUsage::$DU_BIN.
SEE ALSO
"tie" in perlfunc, du(1)