I have a piece of software that rotates its log files when it restarts. However, during development, I am restarting it a lot, so I would like to monitor the latest log file at any time.
If I start
less normally -
less program.log - and hit
Shift-f to tail, when the log file is rotated, I carry on monitoring the old log file. I assume this is because the inode number stays the same and
less has an open file handle to that inode.
Is it possible to monitor the latest activity on whatever log file is currently called
Specifically, I am working on Sun OS, so a solution that works there would be ideal.