Edward Peschko wrote:

> All,
>
> I was wondering how easy would it be to
> alter tail so that it looks for new files that
> match a certain pattern every few seconds
> to tail?
>
> I have an application where several temp
> files are created, and I don't know what
> they are in advance, eg:
>
> /tmp/newlog.$$
>
> would create /tmp/newlog.2432, etc.
>
> which then could be tailed by
>
> tail -f /tmp/newlog --pat
>
> would tail all files that started with
> /tmp/newlog..
>
> Again, how easy would this be to
> implement, or is it already implemented?
>
> Thanks much,

Applications to look at:

    inotifywatch
    inotifywait

This is a perl module:

    Linux::Inotify2

Or write some C code using inotify(7).


Reply via email to