title: Copy Folders and its files with specific date in Linux
body: <p>Is there a way to copy folders and its contents with specific modification date in Linux, for example I have this folder A and B it contains files with modified date <code>2015-01-01</code> to <code>2015-01-18</code>, is it possible to copy folder A and B containing only files modified on <code>2015-01-01</code> to <code>2015-01-08</code>?</p>
  
  <p>I did some research and came up with this</p>
  
  <pre><code>find ./ -type d -exec mkdir -p {} $target{} \;
  find $source -mtime +30 -exec cp -p "{}" $target \;
  </code></pre>
  
  <p>but after executing the 2nd line, files will be copied to the root directory on target location, not in the same structure as the source</p>
  
  <p>for example i have this source directory to be copied on the target</p>
  
  <pre><code>/storage/subdir1/* (modified date range - 2015-01-01 to 2015-01-18)
  /storage/subdir2/* (modified date range - 2015-01-01 to 2015-01-18)
  /storage/subdir3/* (modified date range - 2015-01-01 to 2015-01-18)
  /storage/subdir4/* (modified date range - 2015-01-01 to 2015-01-18)
  </code></pre>
  
  <p>would it be possible that in the target directory (/targetdir/) all sub directories will be created automatically and it contains only files with modified date (2015-01-01 to 2015-01-08)</p>
  
  <p>John</p>