title: Extract date from log file
body: <p>I have a log line like this:</p>
  
  <pre><code>Tue Dec  2 10:03:46 2014 1 10.0.0.1 0 /home/test4/TEST_LOGIN_201312021003.201412021003.23872.sqlLdr b _ i r test4 ftp 0 * c
  </code></pre>
  
  <p>And I can print date value of this line like this.</p>
  
  <pre><code>echo $log | awk '{print $9}' | grep -oP '(?&lt;!\d)201\d{9}' | head -n 1
  </code></pre>
  
  <p>I have another log line like this, how can I print date value? </p>
  
  <pre><code>Tue Dec  9 10:48:13 2014 1 10.0.0.1 80 /home/DATA1/2014/12/11/16/20/blablabla_data-2014_12_11_16_20.txt b _ i r spy ftp 0 * c
  </code></pre>
  
  <p>I tried my awk/grep solution, but it prints <code>201</code> and <code>9</code> number after <code>201</code> when see <code>201</code>.</p>
  
  <p>Sub folders and data name is the same:</p>
  
  <pre><code>2014/12/11/16/20 --&gt; 11 Dec 2014 16:20 &lt;-- blablabla_data-2014_12_11_16_20.txt
  </code></pre>
  
  <p>note: <code>/home/DATA1</code> is not static. <code>year/month/day/hour/minute</code> is static.</p>