- 论坛徽章:
- 0
|
回复 #4 yingweixu 的帖子
多谢两位关注。问题解决了
默认是根据 file descriptor检索的。
-F 参数可以解决
tail --help
-F same as --follow=name --retry
With --follow (-f), tail defaults to following the file descriptor, which means that even if a tail'ed file is renamed, tail will
continue to track its end. This default behavior is not desirable when you really want to track the actual name of the file, not
the file descriptor (e.g., log rotation). Use --follow=name in that case. That causes tail to track the named file by reopening
it periodically to see if it has been removed and recreated by some other program. |
|