Can someone advise how to modify it so I can check between x hours and y hours - e.g. so I can check for all files created between 3 hours ago and 6 hours ago - e.g. created in a specific time period
But before that, I would suggest you to take little more time and understand how it works for last 24 hrs(see where number 24 is used there) and try changing that number and see the effects.
yes I know I can change that number and get all in last 12 hours or 6 hours - and clearly know what effects it has on results
BUT I want to enhance it as per question so I can get between x hours and y hours, and changing that one number doesn’t help me, hence asking question!
Obviously not that simple as solution you gave doesn't work as both conditions use -gt and even I worked out one needs to be -lt
Results using the "actually not that hard" reply from Olaf in a folder containing 5 files, four of them created 2 1/2 hours ago and one created 2 minutes ago - if I use this
correctly gives me the four files created 2 1/2 hours ago
Thank you both for your replies to this “not so hard” question, I had googled and not got a result, and thought I would ask on this “friendly” forum - in return I get sarcasm and a wrong answer, but at least it guided me to the right answer
[/quote]
Great. So you're obviously a step ahaed a lot of others.
[quote quote=155274]
Obviously not that simple as solution you gave doesn't work as both conditions use -gt and even I worked out one needs to be -lt
[/quote]
You're right. I've made a mistake. I didn't test before I posted. Sorry about that. Nobody is perfect.
[quote quote=155274]
correctly gives me the four files created 2 1/2 hours ago[/quote]
Great. I'm glad you finaly achieved what you was looking for.
[quote quote=155274] but at least it guided me to the right answer [/quote]
Isn't that great? We both learned something today.
Have a nice Weekend.
Great that you’ve found the solution and glad that you fixed it yourself. We are always glad when the requestor finds the answer of their own. Instead of jumping to the answer we try to guide by giving hints. Hence He/She learns How it works and Why is it so.