title: rsync : Recursively sync all files while ignoring the directory structure
body: <p>I am trying to create a bash script for syncing music from my desktop to a mobile device. The desktop is the source.</p>
  
  <p>Is there a way to make rsync recursively sync files but ignore the directory structure? If a file was deleted from the desktop, I want it to be deleted on the device as well.</p>
  
  <p>The directory structure on my desktop is something like this.</p>
  
  <pre><code>    Artist1/
          Artist1/art1_track1.mp3
          Artist1/art1_track2.mp3
          Artist1/art1_track3.mp3
      Artist2/
          Artist2/art2_track1.mp3
          Artist2/art2_track2.mp3
          Artist2/art2_track3.mp3
      ...
  </code></pre>
  
  <p>The directory structure that I want on the device is:</p>
  
  <pre><code>    Music/
          art1_track1.mp3
          art1_track2.mp3
          art1_track3.mp3
          art2_track1.mp3
          art2_track2.mp3
          art2_track3.mp3
      ...
  </code></pre>