Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-Id: <5.2.1.1.2.20030708074947.01e81698@pop.sonic.net> X-Sender: rschulz AT pop DOT sonic DOT net Date: Tue, 08 Jul 2003 07:57:19 -0700 To: cygwin AT cygwin DOT com From: Randall R Schulz Subject: Re: Advice on where to look to solve a problem In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Steve, This is elementary Unix script programming. Well, maybe intermediate scripting. The "find" command will do everything you want. Read the man page ("man find"). It's chock full 'o options. I do suggest you clarify your file age criteria. File time stamps have approximately second-level resolution (though find gives you only minutes or days as an age specification) so saying "older than the current date" sounds a little ambiguous. (No doubt you know what you mean. Just be sure you get it straight before writing your script or developing your find incantation.) Find also allows you to use the modification time of an existing file as the age reference. In conjunction with this, you might want to review the capabilities of the "touch" command, which allows to you set the modification time of a file to an arbitrary value. Good luck. Randall Schulz At 07:31 2003-07-08, Steve wrote: >Hi; > >I'm on windows 2000 with cygwin. > >I need to make a script that will check all of the file modified dates >on all of the files in a list of directories. If any of these dates >is older then the current date I want to print the name of the file >and the date to a file. > >I'm new to bash scripting and many unix commands. What are the >commands that I want to loook at that could do these things for me? > >Thanks in advance > >Steve -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/