The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How can i copy files by date last modifed range? geauxsaints UNIX for Advanced & Expert Users 4 05-25-2008 08:06 AM
Search files between a date range zcanji Shell Programming and Scripting 4 09-05-2007 12:38 AM
automated ftp script from unix -date range of files koduri0475 Shell Programming and Scripting 1 11-10-2005 06:50 AM
cp only files in certain date range ee7klt UNIX for Dummies Questions & Answers 1 06-27-2005 06:35 PM
Moving Files within a particular date range rooh UNIX for Dummies Questions & Answers 3 03-18-2002 06:59 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-02-2008
Registered User
 

Join Date: Apr 2008
Posts: 4
How to display files that have been modifed between a given date range

Hi,
I am new to Unix and was trying different ways of how to display the list of file names modified between a given date range in sorting order.I will get the fromdate and Todate from the browser, I need to display the list of all the file names that are modified between the given date range.Please help.

I tried few options like using find. -mtime -20 ... by first calculating the number of days from the current date for fromdate and Todate and then applied some complex logic to get the common files among the two results.

Say for example: fromdate is 30 days before the current date and Todate is 20 days ago the current date. Then I found all the files that are modified last 30 days and last 20 days and then used some complex logic to find the disjoint, however the final result wasnt perfect.Any simpler solutions? Thanks in advance
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-02-2008
Tytalus's Avatar
Registered User
 

Join Date: Jun 2003
Location: Scotland
Posts: 249
Code:
find * -prune -mtime +20 -mtime -30
shoudl be close....
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:05 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0