1834532 Members
3157 Online
110069 Solutions
New Discussion

Re: script help

 
SOLVED
Go to solution
Eric Locsin
Frequent Advisor

script help

Is there a simple way to list files created between two times? I'm trying to create a script that will output certain files created between 10 PM the night before and 6 AM the next day.

Eric
3 REPLIES 3
Pete Randall
Outstanding Contributor
Solution

Re: script help

Eric,

Use the touch command to create two reference files with your start and end times, then use the find command with the "-newer" option and the "! -newer" option.


Pete

Pete
Steve Steel
Honored Contributor

Re: script help

Hi


At 10pm use cron to make file a

At 6am use cron to make or touch file b

Then use 1 line

example
find /home/steves -type f -newer filea -a ! -newer fileb

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Eric Locsin
Frequent Advisor

Re: script help

Thanks!