title: Tesseract OCR large number of files
body: <p>I have around 135000 <code>.TIF</code> files (1.2KB to 1.4KB) sitting on my hard drive. I need to extract text out of those files. If I run <code>tesseract</code> as a cron job I am getting 500 to 600 per hour at the most. Can anyone suggest me strategies so I can get atleast 500 per minute?</p>
  
  <p>UPDATE:</p>
  
  <p>Below is my code after implementing on suggestions given by @Mark still I dont seem to go beyond 20 files per min. </p>
  
  <pre><code>#!/bin/bash
  
  cd /mnt/ramdisk/input
  
  function tess() 
  {
      if [ -f /mnt/ramdisk/output/$2.txt ]
          then
          echo skipping $2
          return
      fi
      tesseract --tessdata-dir /mnt/ramdisk/tessdata -l eng+kan $1 /mnt/ramdisk/output/$2 &gt; /dev/null 2&gt;&amp;1
  }
  
  export -f tess
  
  find . -name \*.tif -print0 | parallel -0 -j100 --progress tess {/} {/.}
  </code></pre>