title: unix find oldest file in directory by date in filename
body: <p>I'm trying to find the oldest file in a directory by looking at the date in the file name.</p>
  
  <p>Example of files:</p>
  
  <p><strong>AA_20150408010101.txt<br>
  AA_AA_20150408020202.txt<br>
  BB_20150408030303.txt</strong></p>
  
  <p>I tried a lot of commands, but this command below is what is closest to the desired result:</p>
  
  <pre><code>ls -lr | head -1
  </code></pre>