What would be the best method to tail a file in Clojure? I haven\'t come across any utilities that would help do so, but ideas on how to build one would be appreciated!
You can use RandomAccessFile to seek directly to the end of the file and search for linebreaks from there. Not as elegant and short as the take-last approach, but also not O(n) which might matter for big file sizes.
No solution for tail -f, though. Some inspiration might be found in JLogTailer.