in reply to Recursive file sizes

While this isn't a perl solution, what about using something that (seems) to be designed for this task, namely a windows port of the linux program du and just using perl to parse it's output, perhaps combined with --max-depth= or something like that.

Replies are listed 'Best First'.
Re: Re: Recursive file sizes
by Preceptor (Deacon) on Sep 03, 2003 at 15:26 UTC

    It doesn't explicitly need to be Windows. I'll try and get hold of a linux box and take a look at du. (At the moment I have a choice of Win2000 or Solaris, and the former I'd never really considered using perl, since I have the latter)

    I'd largely rejected du, primarily because in it's POSIX form it just prints the current level. (so in order to show sizes at each of the levels, you're effectively doing the job 5 times).

      Dunno about the posix form, but the one that comes with cygwin atleast recurses through directories, giving me something like:
      3.0k ./NetStorm/w 10M ./NetStorm/d 0 ./NetStorm/import 4.2M ./NetStorm/sound 2.2M ./NetStorm/help 32M ./NetStorm