title: rsync and (post) process synced file
body: <p>i like rsync my photos from one (linux) disc partition to an other (backup location) using an shell script.
  The problem is, that I need to re-scale all photos which are saved on the backup location, for example with <code>mogrify</code>.</p>
  
  <p>Is it possible to post-process every file, which is synced/copied by rsync?
  In oder to execute <code>mogrify</code> on every synced file?</p>
  
  <p>An other way could using rsync (only) to generate the list of files which have to be synced. Next step: run a loop to <code>mogrify</code> every list entry in order to output the scaled photo to the backup location.</p>
  
  <p>The problem is, that I have to add all the directories and child-directories to keep the original folder structure before saving the photo.</p>
  
  <p>Using rsync would handle the folder creation "on the fly".</p>
  
  <p>So: is it possible to execute an command on every file synced with rsync?</p>