title: Assist With AWS CLI S3 Bucket/Folder File Search
body: <p>I have several folders and only certain folders contain files with &quot;.003&quot; at the end of their name.  These files do not have an extension.</p>
  <p>I am interested in finding out:</p>
  <ol>
  <li><p>The name of the containing folder any of those files ARE in (inside of the bucket) and possibly listed only once (no duplication)?</p>
  </li>
  <li><p>The name of the containing folder that those files are NOT in?</p>
  </li>
  </ol>
  <p>I know how to do a search for a file like so:</p>
  <pre><code>aws s3 ls s3://{bucket}/{folder1}/{folder2} --recursive |grep &quot;\.003&quot;
  </code></pre>
  <p>Are there CLI commands that can give me what I am looking for?</p>
  <p>If this or something like this has been asked before please point me in the correct direction.  My apologies if so!  :)</p>
  <p>Thank you for your time!</p>