Hi all,
First post, be gentle
OK I'm trying to list all files in a directory that are between x days and y days old, where I need to treat days as being from 00:00 to 23:59. i.e. a list of all files between 1 day and 8 days old would include all files between 00:00 8 days ago and 23:59 1 day ago.
I've had a look through the various FAQ pages (Some nice work there by the way) and done a few searches, but either my specific question hasn't been answered, or I've just not managed to find the right keywords to search with yet.
I've tried using find...
find . -mtime +0 -mtime -8 \( ! -name . -prune \)
But the problem with 'find' is that -8 etc. actually means 8 literal days (as in 8x24hrs) and not 8 days (as in a day being from 00:00 - 23:59).
I could use this if it was going to be in a cron job, but it would have to run the 'find' command at exactly 00:00 to work. But I need to be able to run this at any time of the day.
Is there an alternate to find that works in whole days instead?
Cheers,
Boothy.