红联Linux门户
Linux帮助

linux之tail -F命令异常file truncated

发布时间:2016-09-07 15:48:10来源:linux网站作者:zolo®
使用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无所适从,采用全部输出的策略.
要应用这种处理很麻烦.暂且不处理!
 
本文永久更新地址:http://www.linuxdiyf.com/linux/23966.html