title: How can I tail a log file with the date appended to its name?
body: <p>I am trying to use tail -f command on a file whose name changes daily i.e. the current date is appended to its name. I tried doing this :</p>
  
  <pre><code>CURRENTDATE=$(date +%Y%m%d.log)
  
  tail -F $CURRENTDATE
  </code></pre>
  
  <p>but it tails the files with the <code>CURRENTDATE</code> set to the time when the script was executed. Is there any way the tail command can automatically switch to the new file when the date changes ? I cannot use crontab here to execute this command every day. Basically I am using this with Flume NG exec source.</p>
  
  <p>I would really appreciate some help on this.</p>