Hi Jose, all.
I've now (at last!) started using your last4 lines program. Thanks a lot- it
works really well and even on a 100M log file it is really really fast -
faster than 1 msec, which I didn't believe until I timed it using
gettickcount. Also it doesn't generate much disk i/o. Reading the who
Hello John,
Thursday, April 14, 2011, 3:26:48 PM, you wrote:
JL> Hi there, thanks for this - looks a very complete function. I hadn't
JL> realised that best way would be to use streaming! I'm trying to write a 3
JL> line test program that just gets last 4 lines of a file.
JL> I'm not very famili
Hello FPC-Pascal,
Tuesday, April 12, 2011, 12:51:17 AM, you wrote:
jgc> So the idea is to open file eg as file of array [1:65536] of char or
jgc> something similar, seek & read to end of file, then go through the last
jgc> array converting to strings by finding crlfs correct? Is this the simplest
Hello FPC-Pascal,
Tuesday, April 12, 2011, 1:09:34 AM, you wrote:
RW> On 04/11/2011 12:32 PM, John Lee wrote:
>> Need to read the last 4 lines (txt) of a very large log file 100M
>> bytes, 100k lines or more lots of times - of course I can read
RW> Hmm, could first have the reader enumerate th
On 04/11/2011 12:32 PM, John Lee wrote:
Need to read the last 4 lines (txt) of a very large log file 100M
bytes, 100k lines or more lots of times - of course I can read
through the file in the normal way but this is rather slow. Is there a
way to 'read lines from the end'? I note that unix tai
So the idea is to open file eg as file of array [1:65536] of char or
something similar, seek & read to end of file, then go through the last
array converting to strings by finding crlfs correct? Is this the simplest
way? If not any outline code?
John
On , José Mejuto wrote:
Hello FPC-Pas
Hello FPC-Pascal,
Monday, April 11, 2011, 7:55:01 PM, you wrote:
>> The idea is easy, instead reading forward, you read backwards in
>> blocks of, say, 64 Kb and count lines back. If not enougth lines you
>> insert another 64 Kb before and so on. Average line is usually less
>> than 100 bytes, so
On Mon, 11 Apr 2011 19:45:10 +0200
José Mejuto wrote:
> Hello FPC-Pascal,
>
> Monday, April 11, 2011, 6:32:20 PM, you wrote:
>
> JL> Need to read the last 4 lines (txt) of a very large log file 100M bytes,
> JL> 100k lines or more lots of times - of course I can read through the file
> in
> J
Hello FPC-Pascal,
Monday, April 11, 2011, 6:32:20 PM, you wrote:
JL> Need to read the last 4 lines (txt) of a very large log file 100M bytes,
JL> 100k lines or more lots of times - of course I can read through the file in
JL> the normal way but this is rather slow. Is there a way to 'read lines
Need to read the last 4 lines (txt) of a very large log file 100M bytes,
100k lines or more lots of times - of course I can read through the file in
the normal way but this is rather slow. Is there a way to 'read lines from
the end'? I note that unix tail or its port to windows does this very fast
10 matches
Mail list logo