On Wed, Mar 25, 2009 at 9:26 AM, David Lum <[email protected]> wrote:
> I have a task where I need to find out how much space files from a certain
> date range are using – example, how much disk space are all files last
> modified sometime in 2006 are using.

  If you're of the command-line persuasion...

  Get the Unix utilities from <http://unxutils.sf.net>.  Put them in
PATH.  Rename FIND.EXE to GFIND.EXE so it won't conflict with the
Microsoft FIND.EXE utility.

  Open a command prompt.  Change to the top-level directory you want
to total.  Run the command:

        gfind -mtime +1095 -a -mtime -1460 -a -print0 | xargs -0 du | gawk "{
sum += $1 }; END { print sum }"

  The above will find files modified three years ago from today's
date.  The two numeric arguments are the number of days ago the file
was modified, from today's date.  Adjust as needed.  The result will
be given in bytes.

-- Ben

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

Reply via email to