Why does less tail mode stop working?

Try using less --follow-name. Even if the file has the same name, the process(es) updating it may be doing so in a way which changes the file's inode -- so from the OS point of view, it's a new file after the updates.


Are you viewing log files that are rotated by logrotate? If the file that less is viewing is renamed (e.g. from log to log.0 by logrotate), less will continue to watch that file, even though new entries are being written to a different file (with the original name).


maybe you could try tail -f [filename] instead?