Re: tricky problem about stat function

2005-11-13 Thread Jeff 'japhy' Pinyan
On Nov 13, ZHAO, BING said: opendir GOP, "SCRATCH/BACKUP" or die "cannot open directory SCRATCH/BACKUP:$!"; my @smm=grep{($_ ne ".") && ($_ ne "..")} readdir GOP; foreach (@smm){ my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $mtime, $ctime, $blksize, $blocks) = stat

Re: tricky problem about stat function-follow up

2005-11-13 Thread ZHAO, BING
On Sun, 13 Nov 2005 17:36:39 -0800 "ZHAO, BING" <[EMAIL PROTECTED]> wrote: opendir GOP, "SCRATCH/BACKUP" or die "cannot open directory SCRATCH/BACKUP:$!"; my @smm=grep{($_ ne ".") && ($_ ne "..")} readdir GOP; foreach (@smm){ my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime,

tricky problem about stat function

2005-11-13 Thread ZHAO, BING
opendir GOP, "SCRATCH/BACKUP" or die "cannot open directory SCRATCH/BACKUP:$!"; my @smm=grep{($_ ne ".") && ($_ ne "..")} readdir GOP; foreach (@smm){ my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $mtime, $ctime, $blksize, $blocks) = stat($_); print $ctime; } cl

Re: STAT function; limit a log file.

2005-10-05 Thread Umesh T G
On 10/4/05, Jay Savage <[EMAIL PROTECTED]> wrote: > > > > > > > I want this file not to grow more than 50KB. > > > How can I go about it. I been stuck here.. this above script will not > do > > Thanks a lot for all that gyan. :) Cheers, Umesh

Re: STAT function; limit a log file.

2005-10-04 Thread Jay Savage
"Because it's up-side down". "Why is that?" "It makes replies harder to read." "Why not?" "Please don't top-post." - Sherm Pendley, Mac OS X Perl list On 10/4/05, Stephen Kratzer <[EMAIL PROTECTED]> wrote: > Chances are that the file size will never equal exactly 500 bytes. You cou

Re: STAT function; limit a log file.

2005-10-04 Thread Stephen Kratzer
Chances are that the file size will never equal exactly 500 bytes. You could use >= instead of eq, and it should work. Also, you don't have to close STDERR before reopening it, and in cases where you want to do numeric comparisons, use == instead of eq. Hope that helps a little. Also, it might

STAT function; limit a log file.

2005-10-04 Thread Umesh T G
Hello List, #!/usr/bin/perl close(STDERR); open(STDERR,">/tmp/test.log") or die " Can't do it!!"; for($i=0; $i <=30; $i++) { print STDERR "print something in the file.\n"; ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat(STDERR); if ( $size eq '500' )

Re: Large file in stat function

2002-12-17 Thread Adnan Olia
D]">news:ato5rr$24p$[EMAIL PROTECTED]... > Hi, > > I am trying to get the size of the file using the stat function in Perl > 5.6.0. The actual size of the file is greater than 5 GB on Mandrake Linux > 8.2 (kernel 2.4) using ext2 filesystem. When I run the stat command, the > valu

Re: Large file in stat function

2002-12-17 Thread Paul Johnson
On Tue, Dec 17, 2002 at 03:44:45PM -0600, Adnan Olia wrote: > I am trying to get the size of the file using the stat function in Perl > 5.6.0. The actual size of the file is greater than 5 GB on Mandrake Linux > 8.2 (kernel 2.4) using ext2 filesystem. When I run the stat command, the &

RE: Large file in stat function

2002-12-17 Thread Dan Muey
PM To: Dan Muey Subject: Re: Large file in stat function Thanks for you responseI have another file which is smaller in size have the same properties as the large file work perfectly fine. The small file permissions, user and group -rw user01 root smallfile.0 The large file permissions,

Large file in stat function

2002-12-17 Thread Adnan Olia
Hi, I am trying to get the size of the file using the stat function in Perl 5.6.0. The actual size of the file is greater than 5 GB on Mandrake Linux 8.2 (kernel 2.4) using ext2 filesystem. When I run the stat command, the value of the size is 0, this is also true for all values of the stat

Re: Stat function

2001-12-10 Thread Maurice Reeves
ate print -A, "\n" if /^c/; } hth, Maurice Reeves buzzcutbuddha www.perlmonks.org >From: COLLINEAU Franck FTRD/DMI/TAM ><[EMAIL PROTECTED]> >To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> >Subject: Stat function >Date: Mon, 10 Dec 2001

RE: Stat function

2001-12-10 Thread COLLINEAU Franck FTRD/DMI/TAM
I have found Thanks -Message d'origine- De : COLLINEAU Franck FTRD/DMI [mailto:[EMAIL PROTECTED]] Envoyé : lundi 10 décembre 2001 11:08 À : '[EMAIL PROTECTED]' Objet : Stat function Greetings, I have the following code: opendir (INFO,"l:/01_informatique&q

Stat function

2001-12-10 Thread COLLINEAU Franck FTRD/DMI/TAM
Greetings, I have the following code: opendir (INFO,"l:/01_informatique") || die " impossible d'ouvrire le répertoire 01_informatique: $!"; while ($fic=readdir INFO) { if($fic=~/^c/) { @date=stat($fic); print "$date[7]\n"; } } close INFO;

RE: Stat function

2001-11-20 Thread Bob Showalter
> -Original Message- > From: COLLINEAU Franck FTRD/DMI/TAM > [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 20, 2001 3:31 AM > To: [EMAIL PROTECTED] > Subject: Stat function > > > Hi! > > I have the following code: > > #!/usr/bin/pe

Stat function

2001-11-20 Thread COLLINEAU Franck FTRD/DMI/TAM
Hi! I have the following code: #!/usr/bin/perl -w open(FIC,">/home/collineau/Perl/Programmes/01_informatique/sauve/c0111_05.ht m") || die "Impossible d'ouvrir $!\n";; @tab = stat (FIC); print scalar localtime($tab[10]); The date of c0111_05.htm is november 5th 2001. But the print is now !

stat function

2001-11-20 Thread Franck Collineau
Hi! I have the following code: #!/usr/bin/perl -w open(FIC,">/home/collineau/Perl/Programmes/01_informatique/sauve/c0111_05.htm ") || die "Impossible d'ouvrir $!\n";; @tab = stat (FIC); print scalar localtime($tab[10]); The date of c0111_05.htm is november 5th 2001. But the print is now !