Problem
Would be nice to have a tail -F clone (following file rotations).
Solution
Several working solutions are possible:
Beware: on Windows sun.nio.fs.WindowsFileAttributes#fileKey yields null.
Benefit
Portable alternative to tail -F that works on Windows out-of-the-box.
Problem
Would be nice to have a
tail -Fclone (following file rotations).Solution
Several working solutions are possible:
BufferedReader.readLine()+Thread.sleep()RandomAccessFile+Thread.sleep()Beware: on Windows
sun.nio.fs.WindowsFileAttributes#fileKeyyields null.Benefit
Portable alternative to
tail -Fthat works on Windows out-of-the-box.