Hello Monks,
A quick stupid question.

I need to build a script to read a directory for some logs files. There is one log file (almost) per day and gets written by some server, whenever there is something interesting.
I wrote a script getting input from 'tail -q -n 0 -f /path/file-2013-11-1-31|'.. Problem is since there is date in the file name (yyyy-mm-dd) so use of wild card gets the 'available' files for me to read.
Whenever a new file is available I don't get that, I verified this by doing ps and all I had was, the available file names with tail.
Question is how to get the new files available to be read as and when they appear in the directory?
I don't know Perl IPC, but I can explore that if needed.
Somehow I'm not getting any ideas for this tricky problem.

Ideas are invited!

Thank you in anticipation.

<! -->
God bless world peace...

In reply to Reading constantly generated log files: Suggestions invited by perlgsm

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.