Find files in a date range?

Alex Janssen alex at ourwoods.org
Sat Jul 28 20:09:26 UTC 2007


Dave M said the following on 07/27/2007 08:19 PM:
> Is there a way to use 'find' to traverse a directory tree and print the 
> full paths to files in a date range? I can do:
>
> $find -L ~/PodCast -name *.mp3 -type f -printf "%h/%f\t%Ty%Tm%Td\n"
>
> to print the file names and modified dates but I also need to limit the 
> output to a range of modified dates. For example 070720 (July 20th 2007) to 
> 070727 (July 27th 2007).
>
> -------------------------------
> Dave M
> Davem (at) Mich (dot) Com
> Ann Arbor, Mich. USA
>
> Protect your digital rights: http://www.eff.org
> "The 'Analog Holes' they want to stop up are our eyes, ears and mouths."
>   
After thinking about this, I wrote the attached Python script.  I think 
it works the way you want.  Give it a try and post back here.
Alex

-- 
Ourwoods.org
 Man who smoke pot choke on handle. - Uncle Chu (261)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dfind.py
Type: text/x-python
Size: 1043 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20070728/45d17827/attachment.py>


More information about the ubuntu-users mailing list