I am having requirement to scan a logfile. The logfile will be there in a FTP location so we will be using FTPclient to read that. My requirement is like I want to read only the updated info from there I.E. Let's say the Logfile is having 50 Lines at 12 P.M. and at 12.05 P.M it has got 70 lines. So My program should return only the updated info. In a nutshell I am looking like RandomAccessFile functionality in FTP.
Asked
Active
Viewed 192 times
0
-
Is the 'updated info' always addition data 'appended' at the end of the file? – ArjunShankar May 08 '12 at 12:03
-
1Have you heard about "rsync"? (rsync is a software application and network protocol for Unix-like and Windows systems that synchronizes files and directories from one location to another while minimizing data transfer using delta encoding when appropriate). – Dandy May 08 '12 at 12:09
1 Answers
0
FTP supports restarting of transfer from given position (while not all servers supported it before, nowadays it seems that all but ancient servers handle REST command). If the log file is always appended, you know it's initial / previous size and you can restart transfer from that position.
Note that functionality of starting the transfer from specified position can be not supported by the FTP client component that you use.

Eugene Mayevski 'Callback
- 45,135
- 8
- 71
- 121