UNIX “tail -f” functionality in Java
Overview If it’s needed to monitor lines appended to the end of the file, UNIX utility “tail” with “-f” parameter is usually used to achieve that. Here is an example: tail -f /var/log/auth.log What if it’s needed not only to monitor lines, but also to process them in your application ? Luckily, there are easy-to-use solutions and one of them is going to be discovered in this article. Apache Commons IO provides a functionality that solves the problem mentioned above. Dependencies First…