ls -l /u02/volestlivelogs01/oradata/ESTDB/archive/*.dbf | sed -e "s/:/ /g" -e "s/ / /g" | perl -lane 'BEGIN {%hash=();} $hash{"$F[5]$F[6]-$F[7]:00"}+= $F[4]; END {foreach $k (sort keys %hash) {print "$k " . int($hash{$k}/(1024*1024)) . " Mb"; } }' |
Friday, 27 February 2009
Perl one-liner to summarize file sizes
Posted by Ook at 03:18
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment