in reply to RE: RE: What's eating all your disk space?
in thread What's eating all your disk space?

I believe your script above has issues:

J. J. Horner
Linux, Perl, Apache, Stronghold, Unix
jhorner@knoxlug.org http://www.knoxlug.org/
  • Comment on RE: RE: RE: What's eating all your disk space?

Replies are listed 'Best First'.
RE: RE: RE: RE: What's eating all your disk space?
by hawson (Monk) on Jul 27, 2000 at 06:32 UTC
    To adress each point:
    • That's a goof left over from development. Oops. Fixes the 3rd point you make as well.
    • I agree that using -w and 'use strict;' are excellent things to do. However, I intended this to be used on the command line either as an alias or shell script somewhere in the your $PATH. I want it to be faster, rather than slower. Granted, the differences are small, I admit. Blindly following the dogma of "must use strict and -w all the time" is dangerous, just as blindly following any dogma is. That said, I use strict; and -w almost always.
    • Noted.
    • I've already taken care of this, or did you not see the -k flag I passed to 'df'? This forces df to print it's numbers in 1Kb blocks instead of the system default block size (which is not always 1024 bytes). Since the numbers are in Kb, I don't have to worry about stripping any metrics, and the 'funny math' becomes trivial. Not all versions of 'du' support Linux's -h tag, but they do support -k.
    In any case, I'll make a few refinments...