linux之tail -F命令异常file truncated

使用tail -F收集日志时,经常报出file truncated, 导致日志又重新读取.
tail: `test.out' has appeared;  following end of new file
1
2
3
4
tail: test.out: file truncated
以前没注意, 后来查询资料,说是某些程序应用不是采用Appender的方式追加内容, 而是使用Replacer的方式追加内容. 导致文件被重新覆盖. 这样就让tail无所适从, 采用全部输出的策略.
要应用这种处理很麻烦. 暂且不处理!

posted @ 2016-09-07 14:20  zolo®  阅读(5234)  评论(0编辑  收藏  举报