in reply to finding top 10 largest files

If you happen to be on a system with lots of files and directories, you may want to avoid any strategy that involves keeping all the path/file names in a hash. I've been burned by this, using a script that was originally created for CDROMS and trying to use it on DVDS -- one day, somebody actually ran it on a DVD that just happened to contain over a million files, and it brought the system to its knees.

In this regard, Abigail's original suggestion seems best -- using a pipeline file handle that runs "find" is very fast and economical in terms of memory, and only keeping track of the 10 largest files seen so far will assure that the script won't blow up as the file space gets bigger.

Replies are listed 'Best First'.
Re: Re: finding top 10 largest files
by zeitgheist (Novice) on Feb 03, 2004 at 06:25 UTC
    < Please don't burn me ;-) >

    Since you're on Windows, there's always:

    Start->Search->For Files or Folders
    Pick the Drive, Go to Size, then pick a limit, say 'at least 10000 Kb', then 'Find'
    Sort the results by clicking on 'Size'

    cheers
    zeitgheist