[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tail -f finish upon another process finish writing to the file
From: |
Pádraig Brady |
Subject: |
Re: tail -f finish upon another process finish writing to the file |
Date: |
Mon, 21 Jan 2019 15:36:18 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 21/01/19 12:27, Peng Yu wrote:
> Hi,
>
> I use tail -f to show a file as it grows. However, if the process
> which writes to the file is finished, tail -f will still wait there.
> Is there a way to let tail -f finish once it detects nobody writes to
> the file? Thanks.
tail has the --pid option, to wait until a particular process exits.
Even though inotify is supported on some systems IN_CLOSE_WRITE
is not used at this time.
thanks,
Pádraig