<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="gmail_quote"><div><pre><small>One little known feature of rsync is the fact that when run over a<br>
remote shell (such as rsh or ssh) you can give any shell command as<br>the remote file list. The shell command is expanded by your remote<br>
shell before rsync is called. For example, see if you can work out<br>what this does:<br><br>        rsync -avR remote:&#39;`find /home -name &quot;*.[ch]&quot;`&#39; /tmp/<br><br>note that that is backquotes enclosed by quotes (some browsers don&#39;t<br>
show that correctly).<br></small></pre>not sure how to make this work.<br></div></div></blockquote><div><br>Little-known indeed--I didn&#39;t know rsync could do that.. that&#39;s really cool.<br>So for a little more explanation, say you have a directory tree /database, and you want to sync only the files that were changed in the last ten days. You should be able to do something like the following:<br>
<br>rsync -av REMOTEHOST:&#39;$(find /database -ctime -10)&#39; /local/database/mirror<br></div></div>&nbsp;&nbsp;&nbsp; which would be about the same as<br>rsync -av REMOTEHOST:&#39;$(find /database -not -ctime +10)&#39; /local/database/mirror<br>
<br>The difference between using find&#39;s ctime and mtime options: mtime will only change if the actual file data has changed, whereas ctime includes both file data and metadata--permissions, ownership info, file name, etc.<br>
<br>Hope that helps!<br>