(top-posting corrected)
Gordon Beaton wrote:
> > On Thu, 27 Dec 2007 01:23:02 -0800 (PST), Sameer wrote:
> >> We have to keep data of 45 days only and have to remove other files
> >> regularly. Currently we use the AWK like utility for the same. It
> >> has some limitations and it do not accept command line parameters
> >> and therefore can not be scheduled as a program.
>
> >> What should i do to make it work or any other suggstions to carry
> >> out the server files deletion task.
>
> > Use find:
>
> > find . -mtime +45 -exec /bin/rm {} \;
>
> > or
>
> > find . -mtime +45 -print0 | xargs -0 /bin/rm
Lew wrote:
> find . -mtime +45 -delete
> find . -mtime +45 -type f -delete
> -------- Original Message --------
> Subject: Re: Deleting files modified before a specified number of days using Java.
> Date: Thu, 27 Dec 2007 03:10:13 -0800 (PST)
> From: Sameer
> To: Lew
>
> Thanks for the suggestions.
You're welcome.
> I am digesting that program and i will update you about its
> functionality.
> Meanwhile:
> What is the Windows 2003 command/utility to do the same as find?
>
> -Sameer

Signature
Lew
Gordon Beaton - 27 Dec 2007 14:20 GMT
>> From: Sameer
[...]
>> What is the Windows 2003 command/utility to do the same as find?
"find" (install Cygwin).
/gordon
--
Greg Miller - 27 Dec 2007 17:05 GMT
There is a utility which will do this in the Windows 2003 Server
resource kit.
>>> From: Sameer
>[...]
[quoted text clipped - 3 lines]
>
>/gordon