hosh
hosh copied to clipboard
follow
Problem
Would be nice to have a tail -F clone (following file rotations).
Solution Several working solutions are possible:
BufferedReader.readLine()+Thread.sleep()RandomAccessFile+Thread.sleep()- https://github.com/apache/commons-io/blob/master/src/main/java/org/apache/commons/io/input/Tailer.java
Beware: on Windows sun.nio.fs.WindowsFileAttributes#fileKey yields null.
Benefit
Portable alternative to tail -F that works on Windows out-of-the-box.