|
Posted by Peter van Schie on 07/14/05 00:53
Kasper Johansen wrote:
>
> As a workaround I have used this line of code:
>
> popen("cat /filenpathanddir", "r");
>
>
> My problem is that I want to jump around in the file (like fseek()), and I
> havent figured out how to do this while using popen() (and "cat"). I only
> have to read the last 5 mb of total 2,4 gb.
>
> Can anyone point me in the direction of how to solve this problem?
>
Hi Kasper,
Instead of using cat, you could use tail if you only need the last xx mb
of the file:
popen("tail --bytes=5120 /fileenpathanddir", "r");
HTH.
--
http://www.phpforums.nl
[Back to original message]
|