Execution problems for listing files between two dates | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Execution problems for listing files between two dates

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 01-31-2013
akshu.agni akshu.agni is offline
Registered User
 
Join Date: Mar 2011
Last Activity: 1 February 2013, 12:45 PM EST
Posts: 17
Thanks: 18
Thanked 0 Times in 0 Posts
Execution problems for listing files between two dates

Hi,

I have a requirement as mentioned below.

I have a file Start.log which is present in a directory called logs. the file is pipe delimitted as shown below

e.g.
file content
Code:
01 | jsSeq | 2013-01-31 00:02:00 | 500

The third field is date column (YYYY-MM-DD HH24:MI:SS)

and similarly i have file End.log and file pattern is as mentioned above.


file content
Code:
01 | jsSeqEND | 2013-01-31 00:12:31 | 3000

I would like to list the files which are present in logs directory which are modified between between the time 2013-01-31 00:02:00 and 2013-01-31 00:12:31 time.

Please suggest me on this.

Rgds
Akshay
Moderator's Comments:
Please use code tags next time for your code and data.

Last edited by vbe; 01-31-2013 at 04:39 AM..
Sponsored Links
    #2  
Old 01-31-2013
Subbeh Subbeh is offline
Registered User
 
Join Date: May 2011
Last Activity: 22 August 2014, 5:53 AM EDT
Posts: 328
Thanks: 35
Thanked 86 Times in 85 Posts
You could create two dummy files with the start and end date using touch -t and use find -newer/-older to find all files between those dates.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Execution Problems teefa Shell Programming and Scripting 6 12-05-2011 06:58 PM
Execution Problems!! mrhiab Shell Programming and Scripting 1 06-06-2011 02:00 AM
execution problems with cron causalmodi777 Programming 1 11-25-2010 07:47 PM
Execution problems with crontab alexcol UNIX for Dummies Questions & Answers 2 12-13-2008 11:56 PM
Recursive directory listing without listing files psingh UNIX for Dummies Questions & Answers 4 05-10-2002 10:52 AM



All times are GMT -4. The time now is 05:27 AM.