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,$atime,$mtime,$ctime,$blksize,$blocks) = stat($filename);
print "print result for $filename is $dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$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,1063246432,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
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]