Simple yet Useful: Unix Tail implementation in Java
Free code for your to enjoy... do drop me an email if you find this useful.
import java.io.*;
public class Tail {
public static void main(String args[]) throws Exception {
FileInputStream file = new FileInputStream(args[0]);
int ch;
while(true) {
while((ch = file.read()) != -1) System.out.write((char) ch);
Thread.sleep(1000);
}
}
}
I would welcome suggestions on how to make it simpler.
<< Home