Best method for seeking to n lines before end of file [ implementation of tail ]
- From: graemenewlands@xxxxxxxxx
- Date: 31 May 2006 11:09:56 -0700
Hello,
Perhaps someone can help me with a problem I have at the moment and is
causing some debate with my colleagues:
What is the best technique to seek to the end of a file and load in
say, the last 10 lines like the tail command does.
My implementation simply seeks to 100 bytes before the end of file, as
I can be fairly sure for the purpose i'm using it for, that this will
give me the data I require. This method is obviously limited as a
generic solution to that problem.
Any ideas would be greatly appreciated,
Graeme Newlands.
.
- Follow-Ups:
- Prev by Date: Re: Negated Perl Regexp, Howabout qr in Modules?
- Next by Date: Re: LV & BM values
- Previous by thread: system call problem under Win32
- Next by thread: Re: Best method for seeking to n lines before end of file [ implementation of tail ]
- Index(es):
Relevant Pages
|