Does "less" have a feature like "tail --follow=name" ("-F")
Yes, less
can follow by file name
The feature has a fairly obscure syntax:
less --follow-name +F file.log
With less, --follow-name
is different from the tail
option --follow=name
.
It does not make less
follow the file, instead it modifies the behaviour of the command key F inside of less to follow based on the file name, not the file descriptor.
Also, there is no normal option to start less
in follow mode.
But you can use the command line to give keystrokes to execute after startup, by prefixing them with +
.
Combining the modifier option with +F
, less
will actually start in the (modified) follow mode.
Use +F
alone for the equivalent of plain tail -f
:
less +F file.log
In Fedora at least less has a +F option that follows the contents of a file just like tail -f does..
Update, try hitting F in less to toggle to follow mode as well