projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added normal storage area of old code.
[feisty_meow.git]
/
scripts
/
files
/
summing_dir.pl
diff --git
a/scripts/files/summing_dir.pl
b/scripts/files/summing_dir.pl
index 4aa2031cd46b3b0ebe24eba3c5c09427a2345449..10604659bc4e40d5c9eb457fd82dbf73c152b0d1 100644
(file)
--- a/
scripts/files/summing_dir.pl
+++ b/
scripts/files/summing_dir.pl
@@
-94,9
+94,19
@@
unlink($temp_file); # clean up.
local($total)=int($lengths);
local($kbytes)=int($total / 102.4) / 10;
local($mbytes)=int($kbytes / 102.4) / 10;
local($total)=int($lengths);
local($kbytes)=int($total / 102.4) / 10;
local($mbytes)=int($kbytes / 102.4) / 10;
+local($gbytes)=int($mbytes / 102.4) / 10;
print "\n";
print "\n";
-print "These files occupy $total bytes ($kbytes KB / $mbytes MB).\n";
+# print a fancy listing showing bytes at least, but only showing mb and gb if appropriate.
+print "These files occupy $total bytes ($kbytes KB";
+if ($mbytes ne 0) {
+ print " / $mbytes MB";
+}
+if ($gbytes ne 0) {
+ print " / $gbytes GB";
+}
+print ").\n";
+
print "Overall Drive Usage (megs):\n";
system("df -m $chewed_line >$temp_file");
print "Overall Drive Usage (megs):\n";
system("df -m $chewed_line >$temp_file");