Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2007

Tip: Looking for answers? Try searching our database.

[Fwd: Re: Deleting files modified before a specified number of days using     Java.]

Thread view: 
Lew - 27 Dec 2007 14:31 GMT
(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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.