some thing like find ./path -ctime +11 -ctime -12 -type f
as i understand it that should find files greater than 11 days and less that 12?
hmm to lazy to test it properly sorry
oh and ofcouse its hideous its using perl!
On 18/07/2004, at 10:45 PM, James Gregory wrote:
On Sun, 2004-07-18 at 22:16 +1000, James Gregory wrote:Hi all,
I just tried to use the 'find' command to locate for me all files on a
filesystem that were modified on a given date. I have just discovered
that this is a moderately difficult problem. 'man find' tells me that
there are atime, ctime and mtime options but they only let me specify
time relative to today in hours. I can see that I potentially could
construct a find query with these tools and judicious use of -a and '!',
but that can't be the simplest way.
So far I've got this:
find . -printf "%Cd-%Cm-%CY\t%h/%f\n" | grep '^06-07-2004' | perl -pe 's/^.*\t//;'
Which is *hideous*. Tell me there's a better way. And I don't mean by substituting 'sed' for 'perl -pe'.
James.
-- James Gregory <[EMAIL PROTECTED]> -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
-- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
