Angsuman's Java Blog

News and views from my perspective as a Chief Software Architect and CEO. Focused on Java and Web Technologies.

Thursday, September 18, 2003

Simple yet Useful: Unix Tail implementation in Java

Free code for your to enjoy... do drop me an email if you find this useful.

public class Tail {
public static void main(String args[]) throws Exception {
FileInputStream file = new FileInputStream(args[0]);
int ch;
while(true) {
while((ch = != -1) System.out.write((char) ch);

I would welcome suggestions on how to make it simpler.