diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-10-30 20:25:34 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-10-30 20:25:34 +0000 |
commit | 50a8f59314ba738d76b7f1552d79b853866a1f63 (patch) | |
tree | 0f37d110ea473859212a8492dcdb63f8efa36e61 /lib/MDV/Draklive/Utils.pm | |
parent | c915dfb3fb98c5c404c70ae578e7c8f77042ba27 (diff) | |
download | draklive-50a8f59314ba738d76b7f1552d79b853866a1f63.tar draklive-50a8f59314ba738d76b7f1552d79b853866a1f63.tar.gz draklive-50a8f59314ba738d76b7f1552d79b853866a1f63.tar.bz2 draklive-50a8f59314ba738d76b7f1552d79b853866a1f63.tar.xz draklive-50a8f59314ba738d76b7f1552d79b853866a1f63.zip |
use again du --apparent-size for some sparse files
Diffstat (limited to 'lib/MDV/Draklive/Utils.pm')
-rw-r--r-- | lib/MDV/Draklive/Utils.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/MDV/Draklive/Utils.pm b/lib/MDV/Draklive/Utils.pm index 7341e34..8e9ed65 100644 --- a/lib/MDV/Draklive/Utils.pm +++ b/lib/MDV/Draklive/Utils.pm @@ -10,7 +10,11 @@ use Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(directory_usage run_ run_foreach); -sub directory_usage { first(split /\s/, `du -s -B 1 $_[0]`) } +sub directory_usage { + my ($dir, $o_apparent) = @_; + my $apparent = $o_apparent && "--apparent-size"; + first(split /\s/, `du -s -B 1 $apparent $_[0]`); + } #- expand only if the pattern contains '*' #- and matches dot characters (like shell dotglob) |