aspose file tools
The moose likes Java in General and the fly likes Tailing a file on Unix Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Tailing a file on Unix" Watch "Tailing a file on Unix" New topic
Author

Tailing a file on Unix

Nicola Guy
Ranch Hand

Joined: Jun 23, 2004
Posts: 91
I posted this before in a different group but got no reply so figured it may be harder than I thought.

My system has a series of log files and what I want is to write a piece of java to tail the last 1000 lines which will then print onto the screen from the BufferedInputStream.

I've got it working from the file but only when it reads the whole file and I can't figure out how to tail the file.

Any help?
Nicola Guy
Ranch Hand

Joined: Jun 23, 2004
Posts: 91
I figured it out!
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Great! Share with us when you do that!


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tailing a file on Unix
 
Similar Threads
Got problem when trying to install JDK5.0 on linux
Got problem when trying to install JDK5.0 on linux
Command to compare two files starting from a certain line
Unusual Linux + JRE
difference between tail and head command