默认情况下,multitail 是否跟在 inode 或文件名之后?

0xC*_*22L 3 logs tail multitail

对于logrotated 文件,通常使用tail -F而不是tail -f跟踪日志文件内容。是否multitail(1)自动跟随名称而不是 inode(这可能会随着日志轮换而改变)?

我筛选了文档并在网上搜索,但无法得出结论性的答案。


感谢接受的答案,我发现该man页面确实提到了我想要的选项,但使用术语“描述符”而不是“索引节点”。所以这个问题和答案应该是下一个人研究这个话题的粘合剂。

-f Follow the following filename, not the descriptor.

--follow-all
  For all files after this switch: follow the following filename, not the descriptor.
Run Code Online (Sandbox Code Playgroud)

Ree*_*phy 5

根据multitail手册

There are a few other options not fitting elsewhere, these are:
-f  This makes MultiTail follow the file. In case the original file gets
    renamed and a new file is created with the original filename, MultiTail
    will start watching the file with the original filename (the one you
    entered).
Run Code Online (Sandbox Code Playgroud)

对我来说,这意味着默认情况下它跟在inode/ 文件描述符而不是文件名之后。

对来源的粗略阅读证明了这一点。在exec.c:79中,follow_filenameVAR(以设置cmdline.c:889ui.c:966定义的后续通过文件名标志(是否)-F--follow=name等)被传递到tail