Ask a Question related to PERL Beginners, Design and Development.
-
Sum #1
About stat problem ??
Dear all
I found that stat command problems, when the file is over 2GB , it
cannot return any result when i use stat command. The following are the
information:
-rw-r--r-- 1 root root 75k Aug 10 08:27 ksyms.6
-rw-r--r-- 1 root root 18M Sep 11 02:13 lastlog
-rw-r--r-- 1 root root 2.9G Sep 11 02:59 maillog
The program is:
#!/usr/bin/perl -w
use strict;
my $filename = "/var/log/maillog";
my
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$ati me,$mtime,$ctime,$blksize,$blocks)
= stat($filename);
print "print result for $filename is
$dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atim e,$mtime,$ctime,$blksize,$blocks
\n";
The result is :
Use of uninitialized value in concatenation (.) or string at ./test.pl
line 8.
Use of uninitialized value in concatenation (.) or string at ./test.pl
line 8.
Use of uninitialized value in concatenation (.) or string at ./test.pl
line 8.
Use of uninitialized value in concatenation (.) or string at ./test.pl
line 8.
Use of uninitialized value in concatenation (.) or string at ./test.pl
line 8.
Use of uninitialized value in concatenation (.) or string at ./test.pl
line 8.
Use of uninitialized value in concatenation (.) or string at ./test.pl
line 8.
Use of uninitialized value in concatenation (.) or string at ./test.pl
line 8.
Use of uninitialized value in concatenation (.) or string at ./test.pl
line 8.
Use of uninitialized value in concatenation (.) or string at ./test.pl
line 8.
Use of uninitialized value in concatenation (.) or string at ./test.pl
line 8.
Use of uninitialized value in concatenation (.) or string at ./test.pl
line 8.
Use of uninitialized value in concatenation (.) or string at ./test.pl
line 8.
print result for /var/log/maillog is ,,,,,,,,,,,,
If we run the same program , but change filename to /var/log/lastlog.
the result is :
print result for /var/log/lastlog is
2306,311299,33188,1,0,0,0,19136220,1063246432,1063 246432,1063246432,4096,37424
My machine is using redhat 7.3 and the perl version is perl-5.6.1-34.99.6
Anyone has ideas on it ? is it bug on this perl version ? Please give
me some advise , Thanks a lot
Sum
Sum Guest
-
#28790 [Com]: Add option to disable stat cache
ID: 28790 Comment by: james at bytehosting dot com Reported By: jnoll at prim dot hu Status: Assigned Bug... -
Help! I need to know how to use a cookie stat!
Hey guys I am currently making my first dynamic website and am using the most recent version of Macromedia Studio. the site is almost done but I... -
Could not stat error message
Joe Burns typed (on Mon, Aug 11, 2003 at 09:43:38PM -0400): | I am trying to create a "tar" output file of the "/usr2" filesystem into a | storage... -
stat question
Hello, A while ago someone suggested using the stat command to get modification times for files etc, ls -al will give the info but I would have... -
lsof & non-stat()-ble NFS server
Hello, We're getting errors in /var/adm/messages saying that an NFS directory is not writable: Jul 17 09:04:33 XXXXXXX nfs: NFS write error... -
James Edward Gray II #2
Re: About stat problem ??
On Wednesday, September 10, 2003, at 10:04 PM, sum wrote:
<snip>> Dear all
>
> I found that stat command problems, when the file is over 2GB , it
> cannot return any result when i use stat command. The following are
> the information:
I'm not sure, but my gut reaction is that this sounds like an OS> My machine is using redhat 7.3 and the perl version is
> perl-5.6.1-34.99.6
>
> Anyone has ideas on it ? is it bug on this perl version ? Please
> give me some advise , Thanks a lot
problem. Does anyone know if Red Hat 7.3 can handle files over 2 Gigs?
Sorry if that's not much help.
James
James Edward Gray II Guest
-
David #3
Re: About stat problem ??
James Edward Gray II wrote:
RH 7.3 is shipped with at least kernel 2.4.18-14 which supports LFS (Large> On Wednesday, September 10, 2003, at 10:04 PM, sum wrote:
>>>> Dear all
>>
>> I found that stat command problems, when the file is over 2GB , it
>> cannot return any result when i use stat command. The following are
>> the information:
> <snip>
>>>> My machine is using redhat 7.3 and the perl version is
>> perl-5.6.1-34.99.6
>>
>> Anyone has ideas on it ? is it bug on this perl version ? Please
>> give me some advise , Thanks a lot
> I'm not sure, but my gut reaction is that this sounds like an OS
> problem. Does anyone know if Red Hat 7.3 can handle files over 2 Gigs?
File Support). if you do:
[panda]$ uname -r
2.4.18-14
you should see something similiar to the above. it's still possible to
rebuild your kernel to have LFS support even if the kernel is < 2.4.x but
that's another story. if your kernel does not support LFS, Perl won't be
able to support it. if your kernel does support LFS, chances are Perl will
also support LFS. you can check to see if your Perl was built to support
LFS by:
[panda]$ perl -V | grep uselargefiles
and if you see something like 'uselargefiles=define' then you are in good
shape. finally, you also want to check if perl is built to use the LFS API:
[panda]$ perl -V | grep OFFSET_BIT
-D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
it's highly unlikely that perl is not using the LFS API if it's capable of
handling large file. RH 7.3 and Perl that came with it, should support LFS
right out of the box.
david
--
$_=q,015001450154015401570040016701570162015401440 041,,*,=*|=*_,split+local$";
map{~$_&1&&{$,<<=1,$#.=qq~\x63\x68\x72\x28@_[$_..$||3])=>~}}0..s~.~~g-1;*_=*#,
goto=>print+eval
David Guest



Reply With Quote

