title: Searching through 100 directories 10 at a time for a files that are of a specific year?
body: <p>I have a directory with about 100 subdirectories that have 5TB of data. I want to collect all data in the year 2016. So as to not strain the server, I would like to search through 10 directories at a time with a maxdepth of 3. Is there a way to search through these directories blocks of 10 at a time?</p>
  
  <p>I have run the following code on my own computer, it outputs garbage data also, I am thinking of nesting a do loop on top of this loop to restrict search through 10 at a time, but I am not sure how it would go. </p>
  
  <pre><code>for d in $(ls /path/to/directory)
  do
          find $d -maxdepth 3 -type d -newermt 2016-01-01 ! -newermt 2016-12-31
          echo $d
  done &gt; /path/to/file
  </code></pre>
  
  <p><code>/path/to/directory</code> is the directory that nests all the 100 subdirectories.</p>
  
  <p>Output will be a list of names sent to a text file, with the directories created in 2016.</p>