title: Downloading pattern matched entries from S3 bucket
body: <p>I have a S3 bucket in which there are several log files stored having the format 
      index.log.yyyy-mm-dd-01
      index.log.yyyy-mm-dd-02
      .
      .
      .</p>
  
  <p>yyyy for year, mm for month and dd for date.</p>
  
  <p>Now i want to download only a few of them. I saw <a href="https://stackoverflow.com/questions/8659382/downloading-an-entire-s3-bucket">Downloading an entire S3 bucket?</a>. The accepted answer of this post is working absolutely fine if I want to download the entire bucket but what should I do if I want to do some pattern matching? I tried the following commands but they didn't worked:</p>
  
  <pre><code>aws s3 sync s3://mybucket/index.log.2014-08-01-* .
  aws s3 sync 's3://mybucket/index.log.2014-08-01-*' .
  </code></pre>
  
  <p>I also tried using s3cmd for downloading purpose using <a href="http://fosshelp.blogspot.in/2013/06" rel="noreferrer">http://fosshelp.blogspot.in/2013/06</a> article's POINT 7 and <a href="http://s3tools.org/s3cmd-sync" rel="noreferrer">http://s3tools.org/s3cmd-sync</a>. Following were the commands that I ran:</p>
  
  <pre><code>s3cmd -c myconf.txt get --exclude '*.log.*' --include '*.2014-08-01-*' s3://mybucket/ .
  s3cmd -c myconf.txt get --exclude '*.log.*' --include '*.2014-08-01-*' s3://mybucket/ .
  </code></pre>
  
  <p>and a few more permutations of this.</p>
  
  <p>Can anyone tell me why isn't pattern matching happening? Or if there is any other tool that I need to use.</p>
  
  <p>Thanks !!</p>