[Yanel-dev] tail -f on Mac OS X

Michael Wechner michael.wechner at wyona.com
Thu Apr 29 23:33:24 CEST 2010


Mehmet Birgi wrote:
> Hi all
>
> For some time now I had the problem that when tailing the Yanel log 
> file (on Mac OS X Snow Leopard) with "tail -f 
> Yanel/logs/log4j-cnode1.log", after a while the tail would stop, and 
> new log entries would not get printed on the screen anymore. The only 
> thing to do was to stop the tail with Ctrl-C, and restart it. I 
> finally found out the reason: although the log file's name did not 
> change due to log file rotation, on the mac, its inode number would 
> change (which apparently may not happen on other filesystems). So, the 
> fix is really simple: use option -F instead of -f. The manpage for 
> tail says:
>
> "The -F option implies the -f option, but tail will also check to see 
> if the file being followed has been renamed or rotated.  The file is 
> closed and reopened when tail detects that the filename being read 
> from has a new inode number."
>
> It's been working for several hours now, so I thought I would share 
> this information.

thanks very much for sharing this info. I have updated

http://www.yanel.org/en/documentation/debugging.html

Thanks

Michi
>
> Happy coding,
>
> Memo
>
>
> -- 
> Mehmet Birgi
> www.wyona.com <http://www.wyona.com>
>



More information about the Yanel-development mailing list