Re: STATing large files

From: Drieux (drieux_at_wetware.com)
Date: 03/12/04


Date: Thu, 11 Mar 2004 18:10:53 -0800
To: Phil Schaechter <pls@datadomain.com>


On Mar 11, 2004, at 3:41 PM, Phil Schaechter wrote:

> Folks,
>
> Does anyone know of a workaround for stat'ing large files on perl <
> 5.6.1 ?
>
> For large files, stat and print -M both return nothing.
>
> We cannot install any modules, or upgrade/recompile perl.

The problem is that you will need to build your perl
with "USE_LARGE_FILES" for it to be able to look at
files greater than the 2Gig limit. You will also have
problems with the rest of the basic file test suite
if the file in question is larger than the 2Gig limit.

There is no 'work around' for the problem - save the
really dorky part that you know the file is 'there'
and open up the directory block with 'opendir()'
and do what you can with any information you can
get from that, but even that is 'dicey' and not
something that I have tested. I got bit by that
problem a while back - and simply rebuilt the code
with the "USE_LARGE_FILES" flag.

HTH.

ciao
drieux

---