Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Copy files by date modified

by dwhite20899 (Friar)
on Jun 08, 2009 at 00:59 UTC ( #769340=note: print w/ replies, xml ) Need Help??


in reply to Copy files by date modified

Hi, svetho!

I also needed a date-modified mode for rsync, so I don't think you missed something there.

I was downloading ISO files into various subdirectories of /home/me/isos and wanted to rsync occasionally, but didn't want to waste time on dirs I already had done.

I wrote a script that "touch"ed a file when it exited, to set the date it was last run. I don't have the code handy, but it went like:

$f = `find /home/me/isos -type f -iname '*iso' `; @imlist = split(/\n/,$f); $touchtime = -M ".touch_sem"; for $image (@imlist) { if ($touchtime <= -M "$image") { #rsync } } `touch .touch_sem `;


Comment on Re: Copy files by date modified
Download Code
Re^2: Copy files by date modified
by Anonymous Monk on Jun 23, 2009 at 19:18 UTC
    what about the --modify-window option in rsync?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://769340]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (9)
As of 2015-07-03 16:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (54 votes), past polls