ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Idea - Return *new* lines from a text file (w/ example)

<< < (2/5) > >>

daddydave:
I cant copy the files. The log files being read can sometimes be well over 10mb so a copy based solutions isnt pratical.
-strictlyfocused02 (July 07, 2010, 11:54 AM)
--- End quote ---

That makes sense. That source code you posted is way over my head and someone else will need to chime in :), but is the gist of it that the function monitors the file size, so that if it was n bytes and now it is n + 1000 bytes, return the last 1000 bytes as lines?

CWuestefeld:
You just need the common tail utility.

I frequently use a Windows GUI-based version called BareTail, which is free and recommended.

daddydave:
You just need the common tail utility.

-CWuestefeld (July 08, 2010, 12:05 PM)
--- End quote ---

I thought of that, but I didn't think it was smart enough to only display the newest lines and not just the last N lines.

strictlyfocused02:
You just need the common tail utility.

I frequently use a Windows GUI-based version called BareTail, which is free and recommended.
-CWuestefeld (July 08, 2010, 12:05 PM)
--- End quote ---
You just need the common tail utility.

-CWuestefeld (July 08, 2010, 12:05 PM)
--- End quote ---

I thought of that, but I didn't think it was smart enough to only display the newest lines and not just the last N lines.
-daddydave (July 08, 2010, 12:10 PM)
--- End quote ---

daddydave is correct, tail performs a similar function to what Im looking for, but lacks in one area. The log could have 3 lines written to it or it could have 300 lines written to it, I would like to be able to retrieve and store solely those new lines.

Hopefully to save some time, I have attempted to use various line counting FileRead techniques in AutoHotkey but with my log files being potentially enormous this takes forever.

rjbull:
Could you:

1) use a "tail" utility to save the last n lines
2) when you want to check what's changed, use "tail" again to save the new tail
3) use a "diff" utility to see the difference?

The UnxUtils project on SourceForge contains command-line versions of both "tail" and "diff."

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version