フラグ for-F
の代わりにフラグを使用します(または、Linux でのみ機能しますが、BSD や Mac OS X でも機能します):-f
tail
--follow=name
-F
--retry
keep trying to open a file even if it is inaccessible when tail
starts or if it becomes inaccessible later -- useful only with
-f
-f, --follow[={name|descriptor}]
output appended data as the file grows; -f, --follow, and --fol-
low=descriptor are equivalent
-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 descrip-
tor (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.