Unix/Linux Go Back    


Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here.

Execution problems for listing files between two dates

Shell Programming and Scripting


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 01-31-2013
akshu.agni akshu.agni is offline
Registered User
 
Join Date: Mar 2011
Last Activity: 3 December 2015, 4:53 AM EST
Posts: 23
Thanks: 23
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:
Execution problems for listing files between two dates 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 Unix and Linux 01-31-2013
Subbeh Subbeh is offline
Registered User
 
Join Date: May 2011
Last Activity: 3 March 2016, 7:23 AM EST
Posts: 332
Thanks: 37
Thanked 87 Times in 86 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 Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 08:14 PM.