
dファイルの場合、ログファイルの内容に従わずにlogrotate
使用するのが一般的です。する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.
答え1
~によると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).
私にとって、これは基本的にinode
ファイル名の代わりに/ファイル記述子に従うことを意味します。
ソースをおおよその読み方で確認できます。exec.c:79
、follow_filename
var(設定cmdline.c:889
またはui.c:966
)の後にファイル名フラグ(など)がに渡されるかどうかを-F
定義--follow=name
しますtail
。