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

---


Relevant Pages

  • Re: What is _
    ... In article, "Jason Mather" ... When you get perl to stat a file (ie you ask perl for information about ... Rich ...
    (comp.lang.perl.misc)
  • Re: Looking for a PERL version of "filetime"
    ... > You should take a look at the Perl documentation before answering ... I've used Perl's stat on many occasions. ... The OP wanted a Linux solution to a problem. ... need a human readable format (no messing around with localtime and/or ...
    (comp.lang.perl.misc)
  • Using Perl Win 32 AS 5.8.x - Anyway to find the File Create Date/Time
    ... stat will give me the mod time, but does not have the create ... From Windows Explorer, I notice that I can get the Create Date. ... Anyway to accomplish this in Perl? ... Senior Programmer Analyst ...
    (perl.beginners)
  • Re: What is _
    ... Richard> When you get perl to stat a file (ie you ask perl for ... Richard> information about the file, eg is it a directory, how long is ... Richard> function called stat, which returns a lot of information ... use of arrow for dereferencing code refs. ...
    (comp.lang.perl.misc)
  • Re: making same change to *lots* of files, *without* date changed
    ... First stat the file, ... >>the stat call, then touch the newly created file with the saved stat ... start modifying the bits. ... I still don't know what "new option" you're talking about, but in Perl, ...
    (comp.lang.perl.misc)